从永久链接中删除“ index.php”
-
-
您正在使用apache并且启用了mod_rewrite吗?这可能是您的特定主机的问题.are you using apache and is mod_rewrite enabled? this is probably a question for your particular host.
- 0
- 2013-07-09
- Milo
-
我不知道.我只是使用网络托管服务.i have no idea. i am just using a web hosting service.
- 0
- 2013-07-09
- pulla
-
我应该禁用删除"index.php"吗?should I disable to remove "index.php"?
- 0
- 2013-07-09
- pulla
-
@pulla您需要了解有关您的Web托管服务的更多信息以及其运行的配置类型.@pulla You need to find out more about your web hosting service and what sort of configuration it runs on.
- 0
- 2013-07-09
- Otto
-
2 个回答
- 投票数
-
- 2013-07-09
转到您的WP-ADMIN->设置->永久链接,并在其中使用永久链接结构更改,如果它生成任何
.htaccess
文件,则复制内容并更新您的.htaccess
文件.或通过创建包含内容
的文件mod_rewrite
来检查是否启用了托管phpinfo.php
<?php phpinfo();?>
上传此文件并通过浏览器浏览.因此,您知道启用了哪些模块.您需要启用mod_rewrite才能从URL中删除
index.php
.更多详细信息,请检查此链接
Go to your WP-ADMIN-->Settings-->Permalink and use the permalink structure change there, if it generate any
.htaccess
file copy the content and update your.htaccess
file.Or Check if your hosting
mod_rewrite
is enable by creating a filephpinfo.php
with content,<?php phpinfo();?>
Upload this file and browse via Browser. So you know which modules are enabled. You need mod_rewrite enable to remove
index.php
from URL.More details Check this link
-
感谢您的回答.我已经尝试过,但是我不知道它没有真正起作用.这可能是托管问题.我删除了所有并安装.一切都没有改变.Thanks for your answer. I have tried but I don't know it's not really working. it could be the hosting problem. I removed all and installed. nothing has be changed.
- 0
- 2013-08-11
- pulla
-
面对同样的问题. 在wordpress永久链接下删除index.php会出现错误"在此服务器上找不到请求的URL/wordpress/test-page/".Facing the same issue. Removing index.php in under wordpress permalink give error "The requested URL /wordpress/test-page/ was not found on this server."
- 2
- 2016-06-24
- Muhammad Azeem
-
- 2016-07-31
有完全相同的问题.但是在我的情况下,根本没有为Apache安装
安装了它mod_rewrite
.我刚刚用sudo a2enmod rewrite
,然后更改了我的
Permalink Settings
.像魅力一样工作.希望有帮助.
Had exactly same issue. But in my case
mod_rewrite
was not installed at all for apache. I just installed it withsudo a2enmod rewrite
and then changed my
Permalink Settings
. Worked like a charm.Hope it helps.
我一直在寻找解决方案.但是我不能.
我的链接都是
domain.com/index.php/post_name/
我真的想删除
/index.php
我搜索并发现了一些...说我需要添加这些..但是它不起作用..
我正在使用3.5.2 wp.
如果您对此一无所知,请告诉我.