tp3.2
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php?s=$1 [QSA,PT,L]
</IfModule>
tp5.5
<IfModule mod_rewrite.c>
Options +FollowSymlinks -Multiviews
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php [L,E=PATH_INFO:$1]
</IfModule>
本文详细介绍了ThinkPHP框架3.2和5.5版本中URL重写的Apache配置方法,对比了两个版本的rewrite规则差异,包括开启重写引擎、条件判断及重写规则的应用。

339

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



