Here is my slim project Structure
-demosetup
-app
-bootstrap
--- start.php
-config
-database
-public
---- .htaccess
---- index.php
-resources
-routes
-vendor
-.env
-composer.json
-composer.lock
In my .htaccess file
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^ index.php [QSA,L]
In my index.php file
require_once __DIR__ . '/../bootstrap/start.php';
$app->run();
In my start.php file
use App\App;
session_start();
require_once __DIR__ . '/../vendor/autoload.php';
$app = new App;
require_once __DIR__ . '/../database/db.php';
require_once __DIR__ . '/../routes/website.php';
I'm having the 403 Forbidden error problem while upload the whole slim 3 project to the server. Im using cPanel goDaddy Hosting site for my server. My server php version is 5.6 , so I'm pretty sure it support all the slim framework version.
All my floder premission are set to 0755 and file are set to 0644.
What am I doing it wrong? I have been trying to figure out the whole day with no luck.
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.