title: Angular HTML5 mode with WordPress, refreshing the page leads to 404
body: <p>I am using routing in my angular app to load urls. This works perfectly when I click links from inside the app, but when I try to go directly to an app url, the server returns a 404.</p>
  
  <p>Here is my code:</p>
  
  <pre><code>myApp.config(function ($routeProvider, $locationProvider) {
      $locationProvider.html5Mode(true);
  
      $routeProvider
          .when('/booking', {
              templateUrl: 'wp-content/themes/myapp/pages/begin.html',
              controller: 'mainController'
          })
          .otherwise({
              redirectTo: "/"
          });
  });
  </code></pre>
  
  <p>My header has <code>&lt;base href="/myapp/"&gt;</code> at the top, within the head tags.</p>
  
  <p>I have read that this is an apache rewrite issue, so I tried modifying my .htaccess to include the following:</p>
  
  <pre><code>&lt;IfModule mod_rewrite.c&gt;
  RewriteEngine On
  RewriteBase /myapp/
  RewriteRule ^index\.php$ - [L]
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule . /myapp/index.php [L]
  &lt;/IfModule&gt;
  </code></pre>
  
  <p>However, this does not seem to make a difference other than redirecting to the 404 page. I am using WAMP and localhost.</p>
  
  <p>How do I make it so that refreshing the app or linking directly to the page will work?</p>