ThinkPHP5.0 hidden entry file index.php

ThinkPHP5.0 hidden entry file index.php

  • TP5.0 entrance hidden files

Tools / materials

 
  • PC(windows 7)
  • phpStudy2016
  • ThinkPHP5.0

Method / Step

 
  1.  

    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

     
  2.  

    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>

  3.  

    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

     
  4.  

    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

Guess you like

Origin www.cnblogs.com/huhewei/p/12022067.html