title: Grunt URL rewrite in Angular application on page reload
body: <p>Here's what the livereload block looks like in Grunt file:</p>
  
  <pre><code>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)
        ];
      }
    }
  }
  </code></pre>
  
  <p>However, if my URL has a '.' (period) in it, Grunt fails to reload the page. I am using HTML5 Mode in my Angular app and that works fine.</p>
  
  <p>Could I please know what part of </p>
  
  <pre><code>[
    require("connect-modrewrite")(["!(\\..+)$ / [L]"])
  ].concat(
    optBase.map(function (path) { return connect.static(path); })
  )
  </code></pre>
  
  <p>is causing it to fail and how do I fix this?</p>
  
  <p>Note: It fails only on page reload. The first time I visit the route it works, then if I hit refresh it fails.</p>