I created the Laravel Project in a local machine and I created the database also. In the local machine, a project is working without any issues but I uploaded my project file into the shard server Cpanel inside the public_html folder and I access the URL it's saying This page isn’t working, HTTP ERROR 500.
Cpanel PHP version is 7.0 Laravel version is 5.6
But I moved the content file inside the public folder to root folder (public_html) and I changed the path in index.php file
require __DIR__.'/vendor/autoload.php';
$app = require_once __DIR__.'/bootstrap/app.php';
And server.php file also I change the path Like this.
if ($uri !== '/' && file_exists(__DIR__.'/public_html'.$uri)) {
return false;
}
require_once __DIR__.'/public_html/index.php';
And My htaccess
<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>
# php -- BEGIN cPanel-generated handler, do not edit
# Set the “alt-php70” package as the default “PHP” programming language.
<IfModule mime_module>
AddHandler application/x-httpd-alt-php70 .php .php7 .phtml
</IfModule>
# php -- END cPanel-generated handler, do not edit
Please help to fix this issues.
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire