D
D
Denis Bukreev2017-04-23 20:46:45
htaccess
Denis Bukreev, 2017-04-23 20:46:45

What does this code from Laravel's .htaccess mean?

90% of what is written in .htaccess is completely incomprehensible to me.
And here I ran into a problem.
I uploaded a laravel project to the server and got a 500 error.
I dug and dug, got to htaccess, started deleting blocks of code one by one and deleting this code:

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

helped start the project.
What does it mean and how much is it needed? And why can work break because of it (locally everything works fine)?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Aksentiev, 2017-04-23
@denisbookreev

90% of the 500s on Laravel are crooked write permissions to storage. Especially after moving the project.
This code redirects all requests to index.
I doubt it very much, but maybe mod rewrite is not installed on the server.
Starting the main page can and helped, but did you try to go to others?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question