Win主机下面移除index.php

  Wordpress          1,818 阅读          2016-03-31

很多朋友在win主机下面安装wordpress,但是固定连接中会出现index.php,删除之后又出现404,首先我们建立一个.htaccess文件,然后输入如下代码:

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]

 

完成以后将文件上传到站点根目录就好了

支付宝二维码
微信二维码

扫码打赏,您说多少就多少!

感谢您的打赏,我们会更加努力的更新站点!

发表评论

  • 暂无评论,快来抢沙发!