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

相關文章
相關標籤/搜索