wordpress伪静态去掉win主机链接中的index.php
  • Blog
  • 2012-02-06
  • (1,479) Views
  • (0) Comments

用Win主机折腾wordpress是件很蛋疼的事情,比如伪静态的话就会多出来一个index.php,看起来贼不爽,下面的方法教你怎么样在Win主机下去掉wordpress伪静态链接里面index.php。

[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]

1、将以上代码复制到文本文档中,并修改文档名称为httpd.ini

2、将httpd.ini文件放入网站根目录

3、修改wordpress固定链接,例如:/%category%/%post_id%.html

4、清除浏览器缓存,刷新网站首页,在点击文章或者分类页面查看index.php是否已经去掉了

 

原文出自:http://zmingcx.com/wordpress-remove-the-index-php-win-the-host-link.html


Comments

Top