made the server work with the rewrites.