Created
May 27, 2019 03:31
-
-
Save mohammedmatar/14762ffd8bc34340dec1663c9ff75498 to your computer and use it in GitHub Desktop.
the only fucking working configuration to handle 404 error when deploying angular to apache, because there when you using angular router and you dont want to enable Hash Strategy you have to create .htaccess and add this fucking code to, plus if you have a ci, you will need to add .htaccess to be copied to the root directory.
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> | |
| Options Indexes FollowSymLinks | |
| RewriteEngine On | |
| RewriteRule ^index\.html$ - [L] | |
| RewriteCond %{REQUEST_FILENAME} !-f | |
| RewriteCond %{REQUEST_FILENAME} !-d | |
| RewriteRule . /index.html [L] | |
| </IfModule> |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
the only fucking working configuration to handle 404 error when deploying angular to apache, because there when you using angular router and you dont want to enable Hash Strategy you have to create .htaccess and add this fucking code to, plus if you have a ci, you will need to add .htaccess to be copied to the root directory.