better url handling for nginx