Win主机安装WordPress主页链接移除index.php

Win主机安装Wordpress主页链接移除index.php | JUST FOR FUN
今日QQ群有人问为何他的wp主页链接后面会有个index.php
这大多会出现在win主机建的wp上,linux下到没怎么见到过。
解决方法

RewriteEngine On
RewriteCompatibility2 On
RepeatLimit 32
RewriteBase
#  3600 = 1 hour
# unsupported directive: CacheClockRate 3600
#  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]

把以上代码放进网站根目录(和wp-config在一个目录)的.htaccess文件里就行了,没文件就自己建立一个。

WP技巧

The7.3添加自定义字体

2016-8-29 23:43:11

WP技巧

解决WordPress主题、插件更新需要ftp账号密码的问题

2016-9-1 19:29:21

个人中心
今日签到
有新私信 私信列表
搜索