.htaccess不影响其他文件夹

时间:2011-09-21 10:04:15

标签: php .htaccess

我有一个影响我的子域文件夹的.htaccess文件,如何防止这种情况发生。希望子域独立于.htaccess文件运行。这是我的.htaccess代码

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]

1 个答案:

答案 0 :(得分:1)

AllowOverride选项设置为Nonehttpd-conf的子域目录(请参阅Apache docs)。