IIS 用ISAPI_Rewrite 隐藏index.php
程序员文章站
2024-02-15 13:43:40
...
IIS 用ISAPI_Rewrite 隐藏index.php 开发者网站:www.574.cc
[ISAPI_Rewrite]
# 3600 = 1 hour
CacheClockRate 3600
RepeatLimit 32
RewriteRule .*\.(?:gif|jpg|png|css|js|txt|jpeg|swf|flv) $0 [I,L]
RewriteRule /httpd(?:\.ini|\.parse\.errors) / [F,I,O]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(?!/index.php)(?!/admin.php)(.*)$ /index.php/$1 [L]
我用的isapi_rewrite 是Discuz的,同时我是在IIS中针对单点设计的。
[ISAPI_Rewrite]
# 3600 = 1 hour
CacheClockRate 3600
RepeatLimit 32
RewriteRule .*\.(?:gif|jpg|png|css|js|txt|jpeg|swf|flv) $0 [I,L]
RewriteRule /httpd(?:\.ini|\.parse\.errors) / [F,I,O]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(?!/index.php)(?!/admin.php)(.*)$ /index.php/$1 [L]
我用的isapi_rewrite 是Discuz的,同时我是在IIS中针对单点设计的。
AD:真正免费,域名+虚机+企业邮箱=0元
上一篇: PHP怎么调出“打开”或“另存为”窗口
下一篇: php 判断mysql是否到记录尾