rewrite help

jeff emminger jemminger at gmail.com
Thu May 29 23:11:12 MSD 2008


How can I rewrite all:

  /subscribe?foo=bar

into

  /subscribe/?foo=bar

(note the trailing slash)

I've tried variations on this with no luck:

location / {
	root   /var/www/docs/site.com/secure;
	index  index.html index.htm index.php;
	rewrite ^/subscribe\?(.*) /subscribe/?$1 permanent;
}

location /subscribe {
	index index.php;
	rewrite ^/subscribe\?(.*) /?$1 permanent;
}

Thanks,
Jeff





More information about the nginx mailing list