Remove URI string?

daveyfx nginx-forum at
Wed Jan 9 16:35:50 UTC 2013

Hello all -

I would like to strip all request_uri strings for a group of server names
and serve up an index page.

Client requests, nginx will direct client to and serve the index page.  Same scenario for host2 -
I would like nginx to direct client to and serve the
same index page.

Would the below work?

server {
    rewrite ^ http://$server_name;
    root /path/to/document/root;
    index index.html;

Thank you!

Posted at Nginx Forum:,234822,234822#msg-234822

More information about the nginx mailing list