📜  如何在 laravel 8 中从 url 中删除 public - PHP 代码示例

📅  最后修改于: 2022-03-11 14:53:46.938000             🧑  作者: Mango

代码示例3

    
        Options -MultiViews
    

    RewriteEngine On

    RewriteCond %{REQUEST_FILENAME} -d [OR]
    RewriteCond %{REQUEST_FILENAME} -f
    RewriteRule ^ ^$1 [N]

    RewriteCond %{REQUEST_URI} (\.\w+$) [NC]
    RewriteRule ^(.*)$ public/$1 

    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^ server.php