Created
July 31, 2020 14:49
-
-
Save matovu-ronald/90ef74abe2f28f85055724a30a177d07 to your computer and use it in GitHub Desktop.
Stack cpanel .htaccess file for laravel application
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
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
# Fake 404 for all files in / | |
RewriteCond %{REQUEST_FILENAME} -f | |
RewriteRule ^/?[^/]+$ - [R=404,L] | |
# Protect rewrite loop: exclude /public | |
RewriteCond %{REQUEST_URI} !^/?public(/.*)?$ | |
RewriteRule ^(.*)$ /public/$1 [L] | |
</IfModule> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment