Home > Backend Development > PHP Tutorial > win下的httpd.ini规则该怎么样写更简洁,求助!

win下的httpd.ini规则该怎么样写更简洁,求助!

WBOY
Release: 2016-06-23 14:28:39
Original
1151 people have browsed it

[ISAPI_Rewrite]# Defend your computer from some worm attacks#RewriteRule .*(?:global.asa|default\.ida|root\.exe|\.\.).* . [F,I,O]# 3600 = 1 hourCacheClockRate 3600RepeatLimit 32# Protect httpd.ini and httpd.parse.errors files# from accessing through HTTP# Rules to ensure that normal content gets throughRewriteRule /tag/(.*) /index\.php\?tag=$1RewriteRule /software-files/(.*) /software-files/$1 [L]RewriteRule /images/(.*) /images/$1 [L]RewriteRule /bbs/(.*) /bbs/$1 [L]RewriteRule /sitemap.xml /sitemap.xml [L]RewriteRule /robots.txt /robots.txt [L]RewriteRule /503.php /503.php  [L]RewriteRule /sitemap_baidu.xml /sitemap_baidu.xml [L]RewriteRule /sitemap.xml.gz /sitemap.xml.gz [L]RewriteRule /sitemap.html /sitemap.html [L]RewriteRule /favicon.ico /favicon.ico [L]RewriteRule /unzip.php /unzip.php [L]RewriteRule /kefu.php /kefu.php [L]RewriteRule /js/(.*) /js/$1 [L]RewriteRule /css/(.*) /css/$1 [L]# For file-based wordpress content (i.e. theme), admin, etc.RewriteRule /wp-(.*) /wp-$1 [L]# For normal wordpress content, via index.phpRewriteRule ^/$ /index.php [L]RewriteRule /(.*) /index.php/$1 [L]
Copy after login



我每在web目录下加一个文件 就得在RewriteRule多加一行 有什么办法可以通匹配所有的文件么 而不需要一个一个加 很麻烦


回复讨论(解决方案)

你试试在RepeatLimit 32的下面加

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

试试

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template