public boolean handleWelcomeRedirect ( FileRequestContext context ) throws IOException { if ( context . file . isFile ( ) && context . file . getName ( ) . equals ( "index.html" ) ) { resolveContentType ( context ) ; String location = context . path . replaceFirst ( "/index.html\\Z" , "" ) ; if ( location . isEmpty ( ) ) location = "/" ; if ( context . request . getQueryString ( ) != null ) location = location + "?" + context . request . getQueryString ( ) ; sendPermanentRedirect ( context , location ) ; return true ; } return false ; }
Forces requests for index files to not use the file name .