ThinkPHP5.0 hidden entry file index.php
-
TP5.0 entrance hidden files
Method / Step
-
First, according to their TP5.0 download the installation package, go to the next public directory, find the .htaccess file (usually the official download, there will be, if not, they own a new .htaccess file), for example, I placed path: phpStudy /WWW/certificate/public/.htaccess
-
Second, open .htaccess file, the following code (if a new file), the file is placed .htaccess
<IfModule mod_rewrite.c>
Options +FollowSymlinks
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php?s=$1 [QSA,PT,L]
</IfModule>
-
Three, .htaccess file already exists, and if the content file is present, RewriteRule ^ (. *) $ Index.php? / $ 1 [QSA, PT, L] will be changed to $ 1 where s = $ 1 to
-
Fourth, then enter in the browser, cert.com / index / index / index, cert.com is my own locally configured virtual domain, and finally a successful visit, (^ - ^) V
END