2
I did the upload of a system in Laravel called android_api on the hostgator server, and configured in the public file.
Until the main page it works, where Laravel 5 appears, but when I put the route I created, it shows page not found.
I posted on the root of my server:
-> raiz
|_ android_api
|_ public_html
|_ android_api (que é a pasta public)
|_ index.php
You can see here as Laravel finds normal, but I set the route I created /listService, given page not found.
My route is like this:
Route::get('/listaService', "GeralController@getServices" );
Locally works.
I see I have to set up a Virtual Host there in the server of the Hostgator, but I did not find this location.
Man .htaccess
is like this:
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews
</IfModule>
RewriteEngine On
RewriteBase /android_api
# 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>
Your
RewriteRule ^(.*)/$ /$1 [L,R=301]
wouldn’t have to beRewriteRule ^(.*)/$ public/$1 [L,R=301]
? See if this helps you: http://www.codegeo.com.br/2013/03/utilizando-htaccess-para-hospedar-uma.html– Fábio Jânio
Only this htaccess was from the project, but I added in the server htaccess those settings that you indicated and worked. You can add as a reply. Thank you
– adventistaam
Ball show then. I also had a similar problem in the past.
– Fábio Jânio