WordPress伪动态设置规矩,301重定向设置办法(win主机)

本站空间为win主机,对于伪动态和301重定向成绩,研讨了好长期终究好了。如今同享给win主机的同窗。
win主机伪动态和301重定向都必要用到httpd.ini文件,上传到网站根目次。
(有httpd.ini文件的改动,没有的间接新建)
先上完备代码:

[ISAPI_Rewrite]
# 3600 = 1 hour
CacheClockRate 3600
RepeatLimit 32
RewriteCond Host: ^yhaow.com$
RewriteRule (.*) http://blog.yhaow.com$1 [R,I]
# Protect httpd.ini and httpd.parse.errors files
# from accessing through HTTP
# wordpress 
# For tag
RewriteRule /tag/(.*)/page/(d+)$ /index.php?tag=$1&paged=$2
RewriteRule /tag/(.+)$ /index.php?tag=$1
# For category
RewriteRule /category/(.*)/page/(d+)$ /index.php?category_name=$1&paged=$2
RewriteRule /category/(.*) /index.php?category_name=$1
# For sitemapxml
RewriteRule /sitemap.xml /sitemap.xml [L]
RewriteRule /sitemap.html /sitemap.html [L]
RewriteRule /sitemap_baidu.xml /sitemap_baidu.xml [L]
RewriteRule /favicon.ico /favicon.ico [L]
# For file-based wordpress content (i.e. theme), admin, etc.
RewriteRule /wp-(.*) /wp-$1 [L]
# For normal wordpress content, via index.php
RewriteRule ^/$ /index.php [L]
RewriteRule /(.*) /index.php/$1 [L]

WP伪动态阐明:
必要在wordpress后盾 设置→牢固衔接→自定义为 /%category%/%postname%.html
[toggle title=”牢固衔接参数”]%year%:基于文章宣布的年份;
%monthnum%:基于文章宣布的月份;
%day%:基于文章宣布当日;
%hour%:基于文章宣布小时数;
%minute%:基于文章宣布分钟数;
%second%:基于文章宣布秒数;
%postname%:基于文章的postname,其值为撰写时指定的缩略名,不指定缩略名时是文章题目;
%post_id%:基于文章post_id;
%category%:基于文章分类,子分类会处置成“分类/子分类”这类情势;
%author%:基于文章作者名。[/toggle]
[toggle title=”网上罕见的几种设置办法”]/%year%/%monthnum%/%day%/%postname%/
/%year%/%monthnum%/%postname%/
/%year%/%monthnum%/%day%/%postname%.html
/%year%/%monthnum%/%postname%.html
/%category%/%postname%.html
/%post_id%.html
本站采纳/%post_id%.html格局,这样使我感到简略[/toggle]

301重定向阐明:

以本站为例:必要把win-ice.xin重定向到www.win-ice.xin
代码以下:RewriteCond Host: ^win-ice.xin$ RewriteRule (.*) http://www.win-ice.xin$1 [R,I] 以上代码,请依据你的网站自行改动。