I have successfully developed an AngularJS application.
The application functions properly with the URL provided below:
http://localhost/AngularDemo/about
However, when I try to modify the URL as shown below, it redirects me to a 404 error page:
http://localhost/AngularDemo%2Fabout
To troubleshoot this issue, I made some changes in the .htaccess file:
RewriteEngine on
# Exclude rewriting files or directories
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} -f [OR]
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} -d
RewriteRule ^ - [L]
# Rewrite all other URLs to index.html for html5 state links
RewriteRule ^ index.html#! [L]