永久链接为什么老是失效 去不掉index.php

讨论程序使用中的问题
回复
tssz
帖子: 28
注册时间: 2013年 3月 18日 14:13
联系:

永久链接为什么老是失效 去不掉index.php

帖子 tssz »

我开启永久链接后,网址中的Index.php就去掉了。
可是重启浏览器再次访问网站的时候,又有index.php了。

再次开启永久链接后,网址中的index.php又可去掉了。
可是再次重启浏览器访问网站的时候,又有Index.php了。

如此往复。何解?

.htacess 权限也设置为 777

代码: 全选

<IfModule mod_rewrite.c> 
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php/$1 [L]
</IfModule>


换成

代码: 全选

< IfModule mod_rewrite.c>
RewriteEngine On

RewriteBase /

RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule ^(.*)$ index.php [L,E=PATH_INFO:$1]

< /IfModule>


也还是一样。。怎么回事?
上次由 tssz 在 2016年 4月 18日 16:26,总共编辑 2 次。
头像
ClayMore
帖子: 2483
注册时间: 2007年 11月 29日 02:55
来自: Sleeping Forest
联系:

Re: 永久链接为什么老是失效

帖子 ClayMore »

LZ的博客是emlog 且环境支持永久链接 LZ是否未开启相关模块


__________________

新版阿里百秀Alibaixiu主题 v11.1 For Typecho
http://xiu.160.me/
tssz
帖子: 28
注册时间: 2013年 3月 18日 14:13
联系:

Re: 永久链接为什么老是失效

帖子 tssz »

个人博客在这里http://penghong.org.cn
tssz
帖子: 28
注册时间: 2013年 3月 18日 14:13
联系:

Re: 永久链接为什么老是失效

帖子 tssz »

我发现,原来是 重起浏览器就又出现了Index.php
我晕死。。
tssz
帖子: 28
注册时间: 2013年 3月 18日 14:13
联系:

Re: 永久链接为什么老是失效 去不掉index.php

帖子 tssz »

解决了。
把typecho_options的表里rewrite的值将1改为0.立马解决了问题
附件
noindexphp.jpg
noindexphp.jpg (33.17 KiB) 查看 5618 次
回复