How to hide certain file type using apache .htaccess?

前端 未结 6 955
不知归路
不知归路 2020-12-15 07:59

Its been a long time since I\'ve needed to crack open an .htaccess file...

What is the simplest way to 40x prevent access to a specific file extension through out the

6条回答
  •  遥遥无期
    2020-12-15 08:12

    If you really want a 404 (and not a 403), you can use mod_rewrite:

    RewriteEngine on
    RewriteRule \.ext$ - [R=404]
    

提交回复
热议问题