Created
October 20, 2021 13:06
-
-
Save nadyshalaby/77c09e16888d21594ff38f87d7013a71 to your computer and use it in GitHub Desktop.
Laravel .htaccess to enable routing from the base
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| RewriteEngine on | |
| # Redirect Trailing Slashes If Not A Folder... | |
| RewriteCond %{REQUEST_FILENAME} !-d | |
| RewriteCond %{REQUEST_URI} (.+)/$ | |
| RewriteRule ^ %1 [L,R=301] | |
| RewriteCond %{REQUEST_URI} !^public | |
| RewriteRule ^(.*)$ public/$1 [L] | |
| # php -- BEGIN cPanel-generated handler, do not edit | |
| # Set the “ea-php74” package as the default “PHP” programming language. | |
| <IfModule mime_module> | |
| AddHandler application/x-httpd-ea-php74 .php .php7 .phtml | |
| </IfModule> | |
| # php -- END cPanel-generated handler, do not edit |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment