title: server-side changes for $locationProvider.html5Mode(true);
body: <p>server code:</p>
  
  <pre><code>app.get('/', function(req, res){
      console.log('executed "/"')
       res.render('home');
  });
  
  app.get('/partials/:name', function (req, res) {
      console.log('executed partials:name');
      var name = req.params.name;
      console.log(name);
      res.render('partials/' + name);
  });
  </code></pre>
  
  <p>the code works perfectly before i put <code>$locationProvider.html5Mode(true);</code> to convert '/#/' url into regular <code>/</code> url. </p>
  
  <p>After which, the <code>console.log('executed partials:name');</code> fails to execute. <a href="http://docs.angularjs.org/guide/dev_guide.services.%24location" rel="nofollow">Documentation</a> says:-</p>
  
  <pre><code>Server side
  Using this mode requires URL rewriting on server side, basically you have to rewrite all 
  your links to entry point of your application (e.g. index.html)
  </code></pre>
  
  <p>The changes I have tried are not working. What are changes to be made?</p>
  
  <p>Edit:  The following is the angular code:</p>
  
  <pre><code>var myApp = angular.module('myApp', []);
  
  myApp.config(['$routeProvider', function($routeProvider, $locationProvider) {
    $routeProvider.
        when('/', {
          templateUrl: 'partials/partial',
          controller: 'homePage'
        }).      
        otherwise({redirectTo: '/login'});
      $locationProvider.html5Mode(true);
  }]);
  </code></pre>
  
  <p>I again mention, the routing works perfectly well, till i add <code>$locationProvider.html5Mode(true);</code> to angular. </p>