html5 mode with grunt serve not working

In grunt file, livereload block looks like this:

 livereload: {
        options: {
          open: true,
          middleware: function (connect, options,middleware) {
            var optBase = (typeof options.base === 'string') ? [options.base] : options.base;
            return [
              [require('connect-modrewrite')(['!(..+)$ / [L]'])].concat(
                optBase.map(function(path){ return connect.static(path); })),
              connect.static('.tmp'),
                      connect().use(
                        '/bower_components',
                        connect.static('./bower_components')
                      ),
                      connect().use(
                        '/app/styles',
                        connect.static('./app/styles')
                      ),
                      connect.static(appConfig.app)
            ];
          }
        }
      },

Adding:

 [require('connect-modrewrite')(['!(..+)$ / [L]'])].concat(
                    optBase.map(function(path){ return connect.static(path); })),

did use to work for me to enable html5 mode, otherwise, my routes do not load without #! when I try to reload through the browser. I do have base href=’/’ added and html5Mode(true) in config. Is there anything else I can try? Why would it really stop working?

Source: AngularJS