?2019-04-11 16:15:55 ?141784 2

tp5隐藏index.php文件

?标签:
thinkphp

在phpstudy的环境下 隐藏tp5的index.php文件??


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


在wamp的环境下 隐藏tp5的index.php文件????

.htaccess内容如下

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


找到Wampserver服务器文件httpd.conf,去掉‘#LoadModule rewrite_module modules/mod_rewrite.so’前面的‘#??
可能还需要查找AllowOverride,把AllowOverride None 改为AllowOverride all??