apache下url重写无效

浏览:1409 发布日期:2016/08/29 分类:求助交流
Thinkphp5的url函数默认生成的是不带index.php的链接,那么当我通过www.xxx.com访问网站的时候,这个网站上生成的url链接都是不带index.php的链接,这个时候我点开任何链接都是404,于是我想用
<IfModule mod_rewrite.c>
Options +FollowSymlinks -Multiviews
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
Rewritebase /
RewriteRule ^(.*)$ index.php/$1 [QSA,PT,L]
</IfModule>
这个htaccess来实现url重写隐藏index.php,结果发现无论怎么写都无效,具体情况请看https://segmentfault.com/q/1010000006752482
最佳答案
评论( 相关
后面还有条评论,点击查看>>