htaccess白名单不起作用

时间:2016-01-18 12:14:17

标签: php .htaccess

我对此类白名单有.htaccess规则:

# Allow whitelisted files
<FilesMatch "^(index.php|imgsize.php|routing.php|browse.php|css.php|joiner.php|js_localize.php|upload.php | watermark.php)*$">
Order allow,deny
Allow from all
deny from 192.168.1.255</FilesMatch>

watermark.php无效。

有什么问题?

1 个答案:

答案 0 :(得分:2)

删除watermark.php之前的空格,它应该可以工作......我编辑了你的代码如下:

(index.php|imgsize.php|routing.php|browse.php|css.php|joiner.php|js_localize.php|upload.php|watermark.php)*$