Route error when uploading project to shared hosting. (Laravel 5.4)

0

I uploaded my project to a shared hosting and it shows without problems the index.php but when clicking on a link it does not redirect me to the page it should, but it shows me error 404 indicating that the page does not exist.

According to the read it can be a problem of the htaccess, I leave here my file:

<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
    Options -MultiViews
</IfModule>
RewriteEngine On
# Redirect Trailing Slashes If Not A Folder...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)/$ /$1 [L,R=301]
# Handle Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
# Handle Authorization Header
RewriteCond %{HTTP:Authorization} .
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
</IfModule>

I currently have the files in the public folder in the root folder of the hosting (public_html).

    
asked by LaConni 16.08.2017 в 21:30
source

1 answer

1

Are the write permissions in the /storage and /bootstrap/cache directories properly updated? You must allow writing in those directories and additionally configure the key of the application using artisan key: generate. For reference I leave the documentation where it talks about the necessary configuration: link

You could also check that the Apache Rewrite module is enabled.

Finally I suggest you try if the routes operate properly using, for example: public/index.php/ruta-prueba . I mention this because sometimes it does not work to use, for example: public/ruta-prueba

    
answered by 24.08.2017 в 19:18