Made some progress, but now the query_string is being doubled.
location /subscribe {
index index.php;
rewrite ^/subscribe$ /subscribe/index.php?$query_string permanent;
}
The above just about does it, but I end up now going from
/subscribe?foo=bar
to:
/subscribe/index.php?foo=bar?foo=bar
If I don't put in the $query_string, then I get nothing at all.
Any help on what I'm doing wrong?
Thanks,
Jeff
Also if it matters, this is a php URL being handled by fastcgi.
On Thu, May 29, 2008 at 3:11 PM, jeff emminger
<jemm...@public.gmane.org> wrote:
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;
}