function(req, res, next) {
        req.url = _.replace(req.url, /^\/docsearch/, ''); // eslint-disable-line no-param-reassign
        next();
      }
function(req, res, next) {
        req.url = _.replace(req.url, /^\/docsearch/, ''); 
        next();
      }
function ( req , res , next ) { req . url = _ . replace ( req . url , / ^\/docsearch / , '' ) ; // eslint-disable-line no-param-reassign next ( ) ; }
Redirect subdirectory to the root (mimicking GitHub pages)
Redirect subdirectory to the root ( mimicking GitHub pages )