wordpress去掉windows主机链接中的index.php

2026-02-16 13:49:55

1、使用记事本新建文档命名为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]

2、将编辑好的文件上传到wordpress网站的根目录,然后在wordpress的后台-固定链接处修改固定链接的样式即可

猜你喜欢