fixed server rewrite