Reputation: 3358
I am trying to deploy my angular project to one of my servers, I have moved to publich_html/XX/YY directory
When I try to access the application all the URL redirect is working fine, but when I try to refresh the URL I am getting 404 error, so I did some research on the internet and found suggestions to resolve with .htaccess file, so I have created the following
# Mod Rewrite
Options +FollowSymLinks
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.html [L]
and uploaded to the same directory(publich_html/XX/YY
), but still i am getting same 404 error on the refresh, can you any help to get fixed this?
Upvotes: 1
Views: 667
Reputation: 225
RewriteEngine On
Options +FollowSymLinks
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.html?/$1 [QSA,L]
The last line is the solution
Upvotes: 1