Home  >  Article  >  PHP Framework  >  How to hide index.php in tp5

How to hide index.php in tp5

藏色散人
藏色散人Original
2020-07-31 10:53:544426browse

tp5 Method to hide index.php: First open the "pullic/static/.htaccess" directory; then modify the content to "RewriteRule ^(.*)index.php?s =1 [QSA,PT,L ]"; finally save the file.

How to hide index.php in tp5

Recommended tutorial: "thinkphp framework"

tp5 hidden index. php

Directory

//pullic/static/.htaccess

The file contents are as follows

<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>

The above is the detailed content of How to hide index.php in tp5. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn