Avoiding unnecessary redirect on static files