default index page for laravel in cpanel 1

default index page for laravel in cpanel

# on cpanel, set document root to Laravels 'public' folder
# put .htaccess to 'public_html' / root directory

RewriteEngine on
RewriteBase /frameworkRootFolder/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ /frameworkRootFolder/index.php [L,QSA]

Here is what the above code is Doing:
1. RewriteEngine on
2. RewriteBase /frameworkRootFolder/
3. RewriteCond %{REQUEST_FILENAME} !-f
4. RewriteRule ^(.*)$ /frameworkRootFolder/index.php [L,QSA]

1. RewriteEngine on
This enables the rewrite engine.

2. RewriteBase /frameworkRootFolder/
This sets the base path for the rewrite engine.

3. RewriteCond %{REQUEST_FILENAME} !-f
This checks if the requested file is not a real file.

4. RewriteRule ^(.*)$ /frameworkRootFolder/index.php [L,QSA]
This rewrites all requests to the index.php file.

Similar Posts