title: URL rewrite with htaccess gets 404 error - AngularJS html5 mode
body: <h2>Angular js page refresh 404 error after removing # and ! from URL</h2>
  <p>I working on an angular(1.7.5) project, in which I want to remove # and ! from the URL, for that, I use the below code</p>
  <pre><code>myApp.config(['$locationProvider', function ($locationProvider) {
       $locationProvider.html5Mode(true);
  }]);
  </code></pre>
  <p>and added base tag in index.html in the root folder</p>
  <pre><code>&lt;base href=&quot;/myApp/&quot;&gt;
  </code></pre>
  <p>and .htaccess file</p>
  <pre><code>RewriteEngine On
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteCond %{REQUEST_URI} !index
  RewriteRule (.*) index.html [L]
  </code></pre>
  <p>finally, I removed the # and ! from the URL, but the issue is when I refresh the page or open the same URL in new tab the page get 404 error,</p>
  <pre><code>http://localhost/dev/ ----- works fine
  </code></pre>
  <p>but</p>
  <pre><code>http://localhost/dev/login ----404 error 
  </code></pre>
  <p>I dont know how to resolve the issue help me thank you.</p>