0

Itried using mod_rewrite to deny access to 1 file on my web server. But it didn't work.

RewriteCond %{REMOTE_ADDR} =10\.0\.0\.145
RewriteRule ^/mylog/_myapi - [F]
4

1 回答 1

1

尝试删除前导斜杠。在 apache 2.* 中,它在应用于 htaccess 文件中的规则之前被删除:

RewriteRule ^mylog/_myapi - [F]
于 2013-07-31T06:14:27.633 回答