Created
August 17, 2023 10:05
-
-
Save abidtkg/487c3e332fd41dbf47aff50df922667e to your computer and use it in GitHub Desktop.
Angular htaccess config
This file contains 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
Options FollowSymLinks ExecCGI | |
RewriteEngine On | |
RewriteBase / | |
RewriteCond %{HTTPS} !=on | |
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301,NE] | |
# If the requested file is not an existing directory or file | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteCond %{REQUEST_FILENAME} !-d | |
# need to add the ^4 in order to avoid triggering a loop | |
RewriteRule ^[^4]* /index.html [L,S=4000] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment