August 8, 2018

Quick htaccess for angular 4/5/6 app production build

Quick htaccess for angular production build whcih we can use under dist folder. I mostly uses the same so took a backup here.

<IfModule mod_rewrite.c>

#RewriteEngine on
#RewriteCond %{REQUEST_URI} !^/index.html$
#RewriteRule . index.html [R=302,L]

RewriteEngine On
# If an existing asset or directory is requested go to it as it is
RewriteRule ^ – [L]

# If the requested resource doesn’t exist, use index.html
RewriteRule ^ /index.html



You may also like...