A
A
Anton_a462020-08-23 22:49:33
Apache HTTP Server
Anton_a46, 2020-08-23 22:49:33

Laravel - All pages except the main 404. How to fix?

Transferred the project to VDS from the local server. Only the main page works, all other routes return 404
htaccess file

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

    RewriteEngine On

    # Handle Authorization Header
    RewriteCond %{HTTP:Authorization} .
    RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

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

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

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anton_a46, 2020-08-24
@Anton_a46

For future generations) I did not find it in the mod_rewrite file, but I found that it can be enabled with the command)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question