Requests to .htaccess should return 404 instead of 403

前端 未结 1 1139
有刺的猬
有刺的猬 2020-12-07 02:29

This is sort of a follow-up to Is there a way to force apache to return 404 instead of 403? which suggested RedirectMatch to 404 to accomplish this.

It

1条回答
  •  有刺的猬
    2020-12-07 02:53

    Just after I posted my question, I came to a solution towards the following:

    • Mimic the default server configuration's rules for .ht type of files.
    • Allow them.
    • Redirect them to 404.

    Works like this:

    
      Order Deny,Allow
      Allow from all
      Satisfy All
      Redirect 404 /
    
    

    0 讨论(0)
提交回复
热议问题