Web services .htaccess重写条件

Web services .htaccess重写条件,web-services,apache,.htaccess,Web Services,Apache,.htaccess,有人能用这个.htaccess文件阻止我吗?我一直在尝试做一个例外,这样我就可以访问我的子域了 form.domain.com 我试过了 重写cond%{REQUEST_URI}^/表格/$ 还有其他几个命令,但运气不好 .htaccess: ####################### # N - T H I N G ! # ####################### # Apache options Options +FollowSymLinks -Indexes Rewri

有人能用这个.htaccess文件阻止我吗?我一直在尝试做一个例外,这样我就可以访问我的子域了 form.domain.com 我试过了 重写cond%{REQUEST_URI}^/表格/$ 还有其他几个命令,但运气不好

.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]

要匹配域,应使用%{HTTP_HOST},如中所示:

RewriteCond %{HTTP_HOST} ^form.domain.com$
RewriteRule ^.*$ - [L]
也就是说,如果域与form.domain.com匹配,则允许URL并停止处理规则

有关更多详细信息,请参阅