注:伪静态必须空间支持且在后台-设置中开启伪静态。
IIS6:(iis6主机请联系主机商修改规则,部分主机支持httpd.ini,请将下列代码保存为httpd.ini或者下载附件中的httpd.ini上传到博客根目录)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
| \[ISAPI\_Rewrite\] # 3600 = 1 hour CacheClockRate 3600 RepeatLimit 32 RewriteRule /robots.txt(.\*) /robots.txt$1 \[L\] RewriteRule /rss.php(.\*) /rss.php$1 \[L\] RewriteRule /tb.php(.\*) /tb.php$1 \[L\] RewriteRule /favicon.ico /favicon.ico \[L\] RewriteRule /xmlrpc.php(.\*) /xmlrpc.php$1 \[L\] RewriteRule /wlwmanifest.xml /wlwmanifest.xml \[L\] RewriteRule /(tm)$ /$1/ \[R\] RewriteRule /(admincontentincludetm)/(.\*) /$1/$2 \[L\] RewriteRule /install.php(.\*) /install.php$1 \[L\] RewriteRule /emlog\_toolkit.php(.\*) /emlog\_toolkit.php$1 \[L\] RewriteRule /up(d.d.d)to(d.d.d).php(.\*) /up$1to$2.php$3 \[L\] RewriteRule ^/$ /index.php \[L\] RewriteRule /(.\*) /index.php/$1 \[L\]
|
支持.htaccess的IIS6服务器规则:
1 2 3 4 5 6 7
| <IfModule dir\_module> RewriteEngine on RewriteBase / RewriteCond %{REQUEST\_FILENAME} !-f RewriteCond %{REQUEST\_FILENAME} !-d RewriteRule .\* index.php/$0 \[L\] </IfModule>
|