title: Remove the # hash from URL when using Vue.js in Laravel Homestead
body: <p>I have a Laravel 5.2 setup running in Homestead and using Vue.js router to build an SPA. I'm trying to completely remove the #hash from the URL which I know can be done, but I keep getting errors:</p>
  
  <p>I've added <code>rewrite ^(.+)$ /index.html last;</code> to my vhosts file in Homestead:</p>
  
  <pre><code>server {
  
      listen 80;
      listen 443 ssl;
      server_name app.myproject.dev;
      root "/home/vagrant/Code/vibecast/app.myproject.com/public";
  
      rewrite ^(.+)$ /index.html last;
  
      index index.html index.htm index.php;
  
      charset utf-8;
  
      ...
  
  }
  </code></pre>
  
  <p>When I restart and open a page I get a <code>500 Internal Server Error</code>.</p>
  
  <p>Is there anything I need added to routes in Laravel?</p>
  
  <pre><code>var router = new VueRouter({
      hashbang: false,
      history: true,
      linkActiveClass: "active"
  })
  </code></pre>
  
  <p>I can get it working without the #hash (or the modified hosts file) when navigating around, but fails when I reload a page.</p>