WordPress在Windows主机中如何实现伪静态

WordPress在Windows主机中如何实现伪静态

新建一个名为 httpd.ini 的文件,用记事本打开,粘贴以下代码:

[ISAPI_Rewrite]
# 3600 = 1 hour
CacheClockRate 3600 RepeatLimit 32
# 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 /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]

将httpd.ini上传至wordpress根目录。

到这里并没有结束,如果你没有去掉分类目录链接中的category,在分类目录下面依然不能实现翻页功能,使用插件wp-no-category-base去掉分类目录链接中的category。


WindowsWordPress

分享到 :
相关推荐