title: AngularJS HTML5 nested routes
body: <p>Angular: 1.1.5</p>
  
  <p>I go to: <code>http://xxxxx.com/route1/route2/route3</code>
  and <code>/route3</code> gets triggered instead of <code>route1/route2/route3</code>
  Works fine with HTML5 mode off ... :(</p>
  
  <p>Nginx config</p>
  
  <pre><code>location / {
      index index.html;
      try_files $uri $uri/ /index.html?$args;
  }
  </code></pre>
  
  <p>My app config</p>
  
  <pre><code>$routeProvider.when('/route1/route2/route3', {
          templateUrl: '/views/home.html',
          controller: 'HomeCtrl'
      });
  
  $routeProvider.when('/route3', {
          templateUrl: '/views/home.html',
          controller: 'HomeCtrl'
      });
  
  $locationProvider.hashPrefix('!');
  $locationProvider.html5Mode(true);
  </code></pre>
  
  <p><code>$location</code> Log:</p>
  
  <pre><code>$$protocol: "http", $$host: "xxxxxx"…}
  $$absUrl: "http://xxxxxxx.com/route1/route2/route3"
  $$hash: ""
  $$host: "10.44.11.73"
  $$path: "/route3"
  $$port: 80
  $$protocol: "http"
  $$replace: false
  $$url: "/route3"
  </code></pre>
  
  <p>How can I change my settings to make HTML5 urls working with nested routes?</p>