Laravel htaccess issue

后端 未结 2 1085
情话喂你
情话喂你 2020-12-31 11:54

I\'m trying to set a site live. The site works perfectly fine on a live dev server which we\'ve been using to show the site to the client. Here is the htaccess from the live

2条回答
  •  孤城傲影
    2020-12-31 12:40

    Use at same level of /public

    This way first redirect to public

    RewriteEngine on
    RewriteCond %{HTTP_HOST} ^domain.com$ [NC,OR]
    RewriteCond %{HTTP_HOST} ^www.domain.com$
    RewriteCond %{REQUEST_URI} !public/
    RewriteRule (.*) /public/$1 [L]
    

    And inside /public

    then, you handle index.php

    
        Options +FollowSymLinks
        RewriteEngine On
    
    
    
    
        RewriteCond %{REQUEST_FILENAME} !-f
        RewriteCond %{REQUEST_FILENAME} !-d
        RewriteRule ^(.*)$ index.php/$1 [L]
    
    

提交回复
热议问题