的.htaccess不会影响到其他文件夹 [英] .htaccess not affecting other folders
本文介绍了的.htaccess不会影响到其他文件夹的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我会影响到我的子域文件夹中的.htaccess文件,怎么发生做我prevent的。希望子域独立运行的.htaccess文件中。这是我的.htaccess code
RewriteEngine叙述上
的RewriteCond%{} REQUEST_FILENAME!-f
的RewriteCond%{} REQUEST_FILENAME!-d
重写规则^([A-ZA-Z] *)/ $ goto.php?页= $ 1
ErrorDocument的404 PageNotFound
IndexIgnore *
####从蠕虫机器保护系统
。重写规则(CMD |根)\ EXE - [F,E = dontlog:1]
##搜索业务
重写规则%{QUERY_STRING}的search.php?ID = $ 1
重写规则^自定义/([0-9] *)/([A-ZA-Z - ] *)?$ customise.php ID = $ 1
####要保持和重定向的CSS /图像/ js文件
重写规则图像/(.+)?$图片/ $ 1 [NC,L]
重写规则的CSS /(.+)?$ CSS / $ 1 [NC,L]
重写规则JS /(.+)?$ JS / $ 1 [NC,L]
重写规则上传/(.+)?$上传/ $ 1 [NC,L]
解决方案
设置的AllowOverride
选项无
在的httpd-conf的
为您的子域目录(见的 Apache的文档)。
I have a .htaccess file that affects my subdomains folder, how do I prevent that from happening. Want the subdomain to run independent of the .htaccess file. Here is my .htaccess code
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([a-zA-Z]*)/?$ goto.php?page=$1
ErrorDocument 404 PageNotFound
IndexIgnore *
####Protect the system from machines with worms
RewriteRule (cmd|root)\.exe - [F,E=dontlog:1]
##Search Business
RewriteRule %{QUERY_STRING} search.php?id=$1
RewriteRule ^Customise/([0-9]*)/([A-Za-z-]*)$ customise.php?id=$1
#### To hold and redirect css/images/js files
RewriteRule images/(.+)?$ images/$1 [NC,L]
RewriteRule css/(.+)?$ css/$1 [NC,L]
RewriteRule js/(.+)?$ js/$1 [NC,L]
RewriteRule uploads/(.+)?$ uploads/$1 [NC,L]
解决方案
Set AllowOverride
option to None
in httpd-conf
for your subdomains directories (see Apache docs).
这篇关于的.htaccess不会影响到其他文件夹的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文