Win主机去掉WordPress链接中的index.php

编辑: 日期:2011-12-23 分类:Wordpress教程 留言:4条留言 2人推荐推荐一下
简介:由于从未使用Win主机搭建Wordpress网站,所以对这方面没有什么研究,今天看到知更鸟的网站有介绍Win主机去掉WordPress链接中的index.php,特别转载过来,希望对Win主机使用Wordpress系统的站长有所帮助。 将以下代码添加到httpd.ini文件中就可以了 [I...

由于从未使用Win主机搭建Wordpress网站,所以对这方面没有什么研究,今天看到知更鸟的网站有介绍Win主机去掉WordPress链接中的index.php,特别转载过来,希望对Win主机使用Wordpress系统的站长有所帮助。

将以下代码添加到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]

将这个httpd.ini文件上传到服务器,然后进入wordpress后台设置下固定链接
链接格式如: %post_id%.html

刷新博客首页,打开文章链接看看链接地址中的index.php是不是消失了。

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

本文链接:Win主机去掉WordPress链接中的index.php

版权所有:维普设计 - 转载请注明出处

客户留言 设置头像 4条
6329

  • 2012年01月7日 at 8:30 下午 4楼

    很实用哦,谢谢分享了。

  • 2012年01月3日 at 10:34 下午 3楼

    多谢多谢,不过最好别用win主机,虽说便宜吧

  • 2011年12月26日 at 10:36 下午 2楼

    很少用WIN的主机~~不错还是支持一个~

  • 2011年12月26日 at 4:30 下午 1楼

    对,于wordpress index.php页面确实没啥用

主题定制 在线客服