windows空间怎么设置wordpress博客伪静态?

admin 小知识windows空间怎么设置wordpress博客伪静态?已关闭评论字数 1277阅读模式

windows空间怎么设置wordpress博客伪静态?

鲜活优惠码分享一下windows空间怎么设置wordpress博客伪静态教程!一下是详细内容,非原创!

很多朋友虽然使用的是PHP空间,但有很多都是放在windows平台上的,不支持.htaccess设置伪静态,很多朋友又想使用wordpress的伪静态功能,本人也遇到了这类情况,使用此方法解决后感觉很不错,就分享给大家。

工具/原料

FLASHFXP软件,用来下载和上传网站源文件

记事本或者EDITPLUS,用来编辑源文件

步骤/方法 godaddy 3月优惠码

使用记事本编辑httpd.ini 文件,编辑完后使用FLASHFXP软件上传至网站根目录
[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 throughRewriteRule /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]

修改wordpress源文件,保证中文标签不会跳转到404页面 域名优惠码 
修改网站目录下wp-includes/class-wp.php文件(请先行备份):
第一步:找到
$pathinfo = $_SERVER['PATH_INFO'];
修改为
$pathinfo = mb_convert_encoding($_SERVER['PATH_INFO'], ‘UTF-8′, ‘GBK’);
第二步:找到
$req_uri = $_SERVER['REQUEST_URI'];
修改为
$req_uri = mb_convert_encoding($_SERVER['REQUEST_URI'], ‘UTF-8′, ‘GBK’);

浏览器中打开你的博客网址,测试伪静态是否成功。

注意事项  godaddy 优惠码 

需要windwows主机支持ISAPI_Rewrite组件,如果不支持可以咨询空间提供商配置 主机优惠码 

修改wp-includes/class-wp.php文件时务必请先备份,以防修改错误导致博客无法使用

以上是windows空间怎么设置wordpress博客伪静态?全文

 
admin
  • 本文由 admin 发表于 2012年3月6日 11:00:00
  • windows空间 wordpress 伪静态
  • wordpress 伪静态
  • wordpress博客 伪静态
  • wordpress博客设置伪静态