当前位置:文档之家› wordpress怎么设置伪静态

wordpress怎么设置伪静态

Wordpress如何设置伪静态
首先确定网站空间是否支持伪静态组件,这是在购买空间时解决的问题,这里不多说。

(不支持伪静态的空间无法设置伪静态)
新建一个txt文件,命名为httpd.ini。

把下面代码粘贴进去:
[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]
保存文件后把此文件上传到网站空间根目录。

然后打开网站后台→左侧的设置→固定链接→自定义结构→粘贴“/%post_id%.html”代码(不含引号)
返回网站前台点击页面,就会看到地址栏里显示的是以id为编号的.Html页面。

这就OK啦
更多wordpress教程请关注:qq日志大全。

相关主题