IIS6:(iis6主机请接洽主机商修改法则,部门主机支持httpd.ini,请将下列代码生存为httpd.ini上传到博客根目次)
[ISAPI_Rewrite]# 3600 = 1 hour
CacheClockRate 3600
RepeatLimit 32
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 /(t|m)$ /$1/ [R]
RewriteRule /(admin|content|include|t|m)/(.*) /$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]
【注】关于IIS6法则说明:由于IIS6不支持.htaccess的一些判定法则,因此只能事先处理惩罚一些会被正常会见的目次可能文件。有些处所大概需要做修改:
1、假如你有其他文件要能正常会见的,参考法则中第五行
RewriteRule /rss.php(.*) /rss.php$1 [L]将rss.php修改为你要会见的文件即可,假如是目次,则参考第10、11行,将目次添加进来:
RewriteRule /(t|m|admin)$ /$1/ [R]RewriteRule /(admin|content|include|t|m)/(.*) /$1/$2 [L]
2、假如你的博客在子目次,那么需要将所有目次都改为子目次的,好比你的博客在emlog目次下,那么法则如下:
[ISAPI_Rewrite]# 3600 = 1 hour
CacheClockRate 3600
RepeatLimit 32
RewriteRule /emlog/rss.php(.*) /emlog/rss.php$1 [L]
RewriteRule /emlog/tb.php(.*) /emlog/tb.php$1 [L]
RewriteRule /emlog/favicon.ico /emlog/favicon.ico [L]
RewriteRule /emlog/xmlrpc.php(.*) /emlog/xmlrpc.php$1 [L]
RewriteRule /emlog/wlwmanifest.xml /emlog/wlwmanifest.xml [L]
RewriteRule /emlog/(t|m)$ /emlog/$1/ [R]
RewriteRule /emlog/(admin|content|include|t|m)/(.*) /emlog/$1/$2 [L]
RewriteRule /emlog/install.php(.*) /emlog/install.php$1 [L]
RewriteRule /emlog/emlog_toolkit.php(.*) /emlog/emlog_toolkit.php$1 [L]
RewriteRule /emlog/up(\d.\d.\d)to(\d.\d.\d).php(.*) /emlog/up$1to$2.php$3 [L]
RewriteRule ^/emlog/$ /emlog/index.php [L]
RewriteRule /emlog/(.*) /emlog/index.php/$1 [L]
nginx:(nginx主机请接洽主机商变动法则,部门主机大概支持自界说法则)
location / {index index.php index.html;
if (!-e $request_filename)
{
rewrite ^/(.+)$ /index.php last;
}
}