K
K
Katrina24102022-01-25 12:53:17
Apache HTTP Server
Katrina2410, 2022-01-25 12:53:17

After uploading to the server, the Laravel application gives an error 500, how to fix it?

When testing on a local server, the application worked properly, after uploading to the server, web redirects began to work incorrectly, the public folder was specified as the start folder (index.php is located in it), if I enter https://MYDOMAIN redirects to https://MYDOMAIN/login ( as it should be), but it gives an error 500. And on https://MYDOMAIN/index.php it redirects to https://MYDOMAIN/index.php/login and everything works, but then all links suffer, since on https: //MYDOMAIN/login index.php was implied, but in the case of https://MYDOMAIN/index.php/login it is specified directly, because of this, images and files are not loaded, since the final path is incorrect.
What could be the reasons for this problem?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
Katrina2410, 2022-01-25
@Katrina2410

The problem is solved
in the .htaccess file,
replace the RewriteRule ^ index.php [L] line. to RewriteRule ^(.*)$ /index.php? [L]

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question