Last active
January 1, 2025 22:41
-
-
Save dirumahrafif/7dca90b420b3592ef1518296d222bce7 to your computer and use it in GitHub Desktop.
Upload Laravel to Shared Hosting, so we don't need to change our file index.php in public folder
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 | |
| RewriteBase / | |
| #Loading PHP as if is public/ from / | |
| RewriteRule ^$ public/index.php [L] | |
| #Loading page as if is public/ from / | |
| RewriteRule ^((?!public/).*)$ public/$1 [L,NC] | |
| RewriteRule (^\.|/\.) - [F] | |
| <FilesMatch "^(\.env\.example|artisan|package\.json|README\.md|readme\.md|composer\.json|composer\.lock|LICENSE|spark|\.env|\.gitignore|builds|phpunit\.xml\.dst|preload\.php)$"> | |
| Require all denied | |
| </FilesMatch> | |
| </IfModule> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment