Fix for nginx rewrite