很多朋友在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]
完成以后将文件上传到站点根目录就好了
感谢您的打赏,我们会更加努力的更新站点!
本文链接:Win主机下面移除index.php
转载声明:本站文章若无特别说明,皆为原创,转载请注明来源:刘荣焕,谢谢!