D
D
Div-Man2018-09-16 02:03:39
Apache HTTP Server
Div-Man, 2018-09-16 02:03:39

How to transfer laravel to hosting?

Did so

public_html/.htaccess
 
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteRule ^$ public/ [L]
RewriteRule ((?s).*) public/$1 [L]
</IfModule>

# public_html/public/.htaccess
 
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^((?s).*)$ index.php?_url=/$1 [QSA,L]
</IfModule>

For some reason, it cannot find the controller on the localhost, everything works hosting 000webhostapp.com tried to rename public_html to public, swears
Route::get('/', '[email protected]');
Forbidden
You don't have permission to access / on this server.
 
Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vyacheslav Barsukov, 2018-09-17
@slavabars

The rule is wrong. Looks inside the root, which is behind your root in fact.
Isn't it easier to fix the path to public in Apache configs?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question