title: Still getting 'Not Found' when manually refreshing with angular.js route
body: <p>After reading a ton of write-ups and stackoverflow questions on Angular.js route, I'm still getting the 'Not Found' error when I do a manual refresh.</p>
  
  <p>Steps:</p>
  
  <ol>
  <li>browse to <code>localhost</code> --> because of my configuration (below), I'm taken to <code>localhost/home</code>. Views and everything load fine.</li>
  <li>hit refresh in the browser --> browser displays this <code>Not Found: the requested /home is not found on this server</code></li>
  </ol>
  
  <p>This question is probably most like <a href="https://stackoverflow.com/questions/14168836/refreshing-page-gives-page-not-found">Refreshing page gives &quot;Page not found&quot;</a></p>
  
  <p><strong>My configuration</strong></p>
  
  <pre class="lang-js prettyprint-override"><code>// Routing configuration.
  angular.module('myModule')
      .config(['$routeProvider', '$locationProvider', 
      function ($routeProvider, $locationProvider) {
          // Enable pushState in routes.
          $locationProvider.html5Mode(true);
  
          $routeProvider
              .when('/home', {
                  templates: {
                      layout: '/views/home.html'
                  },
                  title: 'Welcome!'
  
              })
              .when('/launchpad', {
                  templates: {
                      layout: '/views/layouts/default.html',
                      content: '/views/partials/profile.html'
                  },
                  title: "Launchpad"
              })
              .otherwise({
                  redirectTo: '/home'
              });
  
      }
  ]);
  </code></pre>
  
  <p><strong>Other things I have done:</strong></p>
  
  <ul>
  <li>In my <code>index.html</code>, I already have the <code>&lt;base href="/"&gt;</code></li>
  <li>upgraded to angular 1.2.1</li>
  </ul>
  
  <p><strong>Here are the htaccess rules I have tried. None work.</strong></p>
  
  <p>from <a href="https://stackoverflow.com/questions/14168836/refreshing-page-gives-page-not-found">Refreshing page gives &quot;Page not found&quot;</a></p>
  
  <pre><code>&lt;ifModule mod_rewrite.c&gt;
      RewriteEngine On
      RewriteCond %{REQUEST_FILENAME} !-f
      RewriteCond %{REQUEST_FILENAME} !-d
      RewriteCond %{REQUEST_URI} !index
      RewriteCond %{REQUEST_URI} !.*\.(css|js|html|png) #Add extra extensions needed.
      RewriteRule (.*) index.html [L]
  &lt;/ifModule&gt;
  </code></pre>
  
  <p>from <a href="http://ericduran.io/2013/05/31/angular-html5Mode-with-yeoman/" rel="nofollow noreferrer">http://ericduran.io/2013/05/31/angular-html5Mode-with-yeoman/</a></p>
  
  <pre><code>&lt;IfModule mod_rewrite.c&gt;
      RewriteEngine On
      RewriteBase /
      RewriteCond %{REQUEST_FILENAME} !-f
      RewriteCond %{REQUEST_FILENAME} !-d
      RewriteRule ^(.*)       /index.html/#!/$1 
  &lt;/IfModule&gt;
  </code></pre>