Skip to content

Instantly share code, notes, and snippets.

@waqasraza123
Created February 7, 2019 10:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save waqasraza123/9ecd631fa76c86d67457abb133aafe80 to your computer and use it in GitHub Desktop.
Save waqasraza123/9ecd631fa76c86d67457abb133aafe80 to your computer and use it in GitHub Desktop.
fix-page-not-found-on-reloading-angular
<IfModule mod_rewrite.c>
RewriteEngine on
# Don't rewrite files or directories
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
# Rewrite everything else to index.html
# to allow html5 state links
RewriteRule ^ index.html [L]
</IfModule>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment