有人能用这个表单文件阻止我吗?我一直在尝试做一个例外,这样我就可以访问我的子域,这个子域是我用RewriteCond %{REQUEST_URI}!^/ form.domain.com /?$和其他几个命令尝试过的表单,但没有成功
.htaccess:
#######################
# N - T H I N G ! #
#######################
# Apache options
Options +FollowSymLinks -Indexes
RewriteEngine on
# Allow only GET and POST verbs
RewriteCond %{REQUEST_METHOD} !^(GET|POST)$ [NC,OR]
# Ban Typical Vulnerability Scanners and others
# Kick out Script Kiddies
RewriteCond %{HTTP_USER_AGENT} ^(java|curl|wget).* [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^.*(libwww-perl|curl|wget|python|nikto|wkito|pikto|scan|acunetix).* [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^.*(winhttp|HTTrack|clshttp|archiver|loader|email|harvest|extract|grab|miner).* [NC,OR]
# Error Page
ErrorDocument 404 /404
# Redirect attachments
RewriteRule ^files/attachments/(.*)/(.*)/(.*)$ files/attachments/$1/$2/$3 [L]
# Redirect all requests to index.php
RewriteRule ^(.*)$ index.php [L,QSA]发布于 2013-02-01 05:32:12
要匹配域,您应使用%{HTTP_HOST},如下所示:
RewriteCond %{HTTP_HOST} ^form.domain.com$
RewriteRule ^.*$ - [L]也就是说,如果域匹配form.domain.com,则允许该URL并停止处理规则。
有关更多详细信息,请参阅Apache documentation。
https://stackoverflow.com/questions/14632747
复制相似问题