Uploaded Laravel project to cpanel and get a blank page and /public on the url Like I said on the title i uploaded my laravel project (that works fine on my local machine) to a subdomain test.mydomain.org.
Without creating an .htaccess file I had a 503 error.
So I created it and used the code bellow. I get now a blank screen and my url goes to test.mydomain.org/public.
My server has php 7.3
Options -MultiViews
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -d [OR]
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule ^ ^ [N]
RewriteCond %{REQUEST_URI} (\.\w+$) [NC]
RewriteRule ^(.*)$ public/
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ server.php
change
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews -Indexes
</IfModule>
RewriteEngine On
# Handle Authorization Header
RewriteCond %{HTTP:Authorization} .
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
# Redirect Trailing Slashes If Not A Folder...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} (.+)/$
RewriteRule ^ %1 [L,R=301]
# Handle Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
</IfModule>
changing the .htaccess did nothing.
i already followed that guide in which i should change the path of the autoloads. and it makes me have a http 500 error
Holly mother of god.... My bad.....
In the .env file i had a unintentional white space. and it broke down everything. Thank you for the help anyway.
Please sign in or create an account to participate in this conversation.