wordpress>正文
WordPress伪静态规则分享(window环境)
2014-05-28 11:15[ISAPI_Rewrite]
# 3600 = 1 hour
CacheClockRate 3600
RepeatLimit 32
# Protect httpd.ini and httpd.parse.errors files
# from accessing through HTTP
# Rules to ensure that normal content gets through
RewriteRule /sitemap.xml /sitemap.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]
方法二:
[ISAPI_Rewrite]
# 3600 = 1 hour
CacheClockRate 3600
RepeatLimit 32
# Protect httpd.ini and httpd.parse.errors
files
# from accessing through HTTP
RewriteCond Host: ^leadkj.com$
RewriteRule (.*) http://www.leadkj.com$1 [I,RP]
# Rules to ensure that normal content gets
through
RewriteRule /software-files/(.*) /software-files/$1
[L]
RewriteRule /images/(.*) /images/$1 [L]
RewriteRule /sitemap.xml /sitemap.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]
RewriteRule ^index.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
把此代码复制一份放到一个新建的txt中。把txt命名为httpd.ini 上传至网站根目录下。里面包含301跳转。
注意:后台固定链接自定义结构设置为
/archives-%post_id%.html
本文链接:https://www.0937.biz/post-151.html
猜你喜欢
- 2014-05-28 谷歌被墙导致WordPress网站变慢的解决办法
- 2014-05-28 更改WordPress网站的URL
- 2014-05-28 WordPress 正文批量替换的两种方法
- 2014-05-28 WordPress伪静态规则分享(window环境)
- 2014-05-28 wordpress手动更新(升级)详细步骤
- 2014-05-28 WordPress固定链接设置的几种方法
- 2014-05-28 一整套WordPress模板制作的教程
- 图文推荐
-
- 热门标签