server { listen 80 default_server; server_name localhost; location / { rewrite ^ http://www.xxx.com/?from-xxx; }}