tp3.2.3如何隐藏index.php

2019独角兽企业重金招聘Python工程师标准>>> hot3.png

在.htaccess这个文件中,框架初始是:

Options +FollowSymlinks
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.)$ index.php/$1 [QSA,PT,L]

只需要改成这样(只有最后一行有所改变):

Options +FollowSymlinks
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
**RewriteRule ^(.
)$ index.php [L,E=PATH_INFO:$1]**

转载于:https://my.oschina.net/u/2456768/blog/3021226

你可能感兴趣的:(tp3.2.3如何隐藏index.php)