tp3.2路由无效去除index.php且apache开启伪静态规则
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews
</IfModule>
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
#RewriteRule ^(.*)$ index.php?/$1 [QSA,PT,L] //phpstudy无效
RewriteRule ^(.*)$ index.php?s=/$1 [QSA,PT,L]
</IfModule>
本文详细介绍了在TP3.2环境下如何配置Apache服务器的伪静态规则,以实现去除index.php的效果。通过调整.htaccess文件中的RewriteEngine、RewriteCond和RewriteRule指令,可以有效地优化网站URL结构,提升用户体验。
1万+

被折叠的 条评论
为什么被折叠?



