欢迎来到站长天空!

WordPress

当前位置: 主页 > CMS教程 > WordPress

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

时间:2025-10-18 16:58:25|栏目:WordPress|点击:

新建一个名为 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。


上一篇:WordPress中.htaccess的使用技巧

栏    目:WordPress

下一篇:真实有效防止网站被恶意镜像的方法(终极版)

本文标题:WordPress在Windows主机中如何实现伪静态

本文地址:https://zz.feitang.co/CMSjiaocheng/25080.html

广告投放 | 联系我们 | 版权申明

申明:本站所有的文章、图片、评论等,均由网友发表或上传并维护或收集自网络,属个人行为,与本站立场无关。

如果侵犯了您的权利,请与我们联系,我们将在24小时内进行处理、任何非本站因素导致的法律后果,本站均不负任何责任。

联系QQ:257218569 | 邮箱:257218569@qq.com

Copyright © 2018-2025 站长天空 版权所有 Powered by EyouCms冀ICP备14023439号