Dealing with the messed up URL rewriting that breaks every time