永发信息网

linux主机 wordpress如何去除index.php

答案:2  悬赏:30  手机版
解决时间 2021-03-26 13:53
  • 提问者网友:人生佛魔见
  • 2021-03-25 15:52
linux主机 wordpress如何去除index.php
最佳答案
  • 五星知识达人网友:玩家
  • 2020-03-05 14:41
打开记事本,把下面代码粘贴进去:
[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是不是消失了。
全部回答
  • 1楼网友:底特律间谍
  • 2019-07-16 06:29
有没有index没有其他影响
我要举报
如以上回答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
点此我要举报以上问答信息
大家都在看
推荐资讯