Answers for "htaccess redirect all requests to index.php"

1

htaccess all requests goes to index.php

# eg. 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]
Posted by: Guest on September-28-2021
0

htaccess route to index.php

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


Using Sub directory:
RewriteRule ^.*$ /mvc/index.php [L,QSA]
Posted by: Guest on June-15-2020

Code answers related to "htaccess redirect all requests to index.php"

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language