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

How to hide index.php in tp5

藏色散人
Release: 2020-07-31 10:53:54
Original
4466 people have browsed it

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
Copy after login

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>
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template