Error 500: When uploading site in Laravel to Hosting, how to put the whole project in public_html?

-1

Hire a Hosting service (Donweb) with an initial plan, which according to the provider's support, does not allow me to access external folders of public_html. So, my whole project has to be contained within it.

I have seen several videos, where they change the address to the path within the index

require __DIR__.'/../bootstrap/autoload.php';

$app = require_once __DIR__.'/../bootstrap/app.php';

But they do it to be able to enter a parent directory. In my case I have to make a change to enter a folder within the public_html

I have also seen that they modify the .htacess but the truth is that I do not understand well the changes that I would have to do for my case. I leave it for the doubts

<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}]

    
asked by Cidius 14.10.2016 в 22:25
source

1 answer

0

The problem is that if you start with / your route will be from the root, in this case it is public_html and it gives you more error if you put /../ in any case I suggest you start with:

require __DIR__.'bootstrap/autoload.php';

$app = require_once __DIR__.'bootstrap/app.php';
    
answered by 14.10.2016 / 23:14
source