编程语言
首页 > 编程语言> > htaccess如何配置隐藏index.php文件

htaccess如何配置隐藏index.php文件

作者:互联网


<IfModule mod_rewrite.c>
    <IfModule mod_negotiation.c>
        Options -MultiViews
    </IfModule>

    RewriteEngine On

    # Redirect Trailing Slashes If Not A Folder...
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)/$ /$1 [L,R=301]

    # Handle Front Controller...
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^ index.php [L]
</IfModule>

标签:index,php,...,REQUEST,FILENAME,htaccess,RewriteCond
来源: https://www.cnblogs.com/itzhangxuhui/p/15698765.html