tp3.2.3如何隐藏index.php

在.htaccess这个文件中,框架初始是:
<IfModule mod_rewrite.c>
Options +FollowSymlinks
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.)$ index.php/$1 [QSA,PT,L]
</IfModule>
只须要改为这样(只有最后一行有所改变):
<IfModule mod_rewrite.c>
Options +FollowSymlinks
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
**RewriteRule ^(.
)$ index.php [L,E=PATH_INFO:$1]**
</IfModule>php

相关文章
相关标签/搜索