(有httpd.ini文件的修改,没有的直接新建)
/%year%/%monthnum%/%postname%/
%monthnum%:基于文章宣布的月份;
%minute%:基于文章宣布分钟数;
/%post_id%.html
%author%:基于文章作者名。[/toggle]
[ISAPI_Rewrite]
# 3600 = 1 hour
CacheClockRate 3600
RepeatLimit 32
RewriteCond Host: ^yhaow.com$
RewriteRule (.*) $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伪静态说明:
/%year%/%monthnum%/%postname%.html
/%year%/%monthnum%/%day%/%postname%.html
%postname%:基于文章的postname,其值为撰写时指定的缩略名,不指定缩略名时是文章标题;
本站文章由SEO技能博客撰稿人原创,作者:无 忧创作,如若转载请注明原文及出处:https://www.ainiseo.com/jianzhan/wordpress/955.html
先上完整代码:%category%:基于文章分类,子分类会处理惩罚成“分类/子分类”这种形式;以本站为例:需要把ainiseo.com重定向到 代码如下:
RewriteCond Host: ^ainiseo.com$ RewriteRule (.*) $1 [R,I] 以上代码,请按照你的网站自行修改。
需要在wordpress靠山 配置→牢靠毗连→自界说为 /%category%/%postname%.html[toggle title=”牢靠毗连参数”]%year%:基于文章宣布的年份;
301重定向说明:
本站回收/%post_id%.html名目,舆情公关,小我私家以为简朴[/toggle]/%category%/%postname%.html%post_id%:基于文章post_id;
本站空间为win主机,关于伪静态和301重定向问题,搜索引擎优化,研究了好长时间终于好了。此刻共享给win主机的同学。
%hour%:基于文章宣布小时数;
WordPress伪静态配置法则,301重定向配置要领(win主机)
[toggle title=”网上常见的几种配置要领”]/%year%/%monthnum%/%day%/%postname%/%second%:基于文章宣布秒数;
win主机伪静态和301重定向都需要用到httpd.ini文件,上传到网站根目次。
%day%:基于文章宣布当日;