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

首页 » 实用教程 » WordPress去掉Win主机链接中的index.php
所属分类:实用教程, 最新动态
发布时间:2013-10-11
浏览次数:5,363 views

你刚才有人问到一个问题“Win主机链接中的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]

 

保存时保存类型选择“所有文件”,并输入文件名称:httpd.ini

将这个httpd.ini文件上传到WP程序所在的目录也就是与index.php在同一个目录内。

之后进入WP后台修改固定链接,比如:/%category%/%post_id%.html

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

相关阅读

WordPress使用 add_query_arg 函数的JS版addQueryArgs简化JS URL 构建

熟悉WordPress开发的朋友很可能用过add_query_arg函数,他可以很方便的帮我们给一个URL添加 […]

WP实现全站HTTPS插件:Really Simple SSL

现在非常流行https,很多的网站都实现了全站https,https是不允许有混合内容(http类的资源)存在 […]

WordPress建站:去除后台修改管理员邮箱时的邮件验证步骤

默认情况下WordPress网站后台修改管理员邮箱时需要进行验证,当我们收到邮件后点里面的链接就可以完成邮箱的 […]