Laravel htaccess

前端 未结 5 796
逝去的感伤
逝去的感伤 2021-01-14 02:28

I\'ve setup a new install of Laravel on my local. It appears there are issues with htaccess or Apache settings. I\'ve researched for a number of hours and tried everything I

5条回答
  •  灰色年华
    2021-01-14 02:57

    This solution worked fine, best solution ever for me. Paste this code into root htaccess. That's all. Leave all other files as they are

    
    
        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
    
    

提交回复
热议问题