Welcome! Log In Create A New Profile

Advanced

rewrite rule with ? in url

April 28, 2015 04:21AM
Hi - I've got a plugin which was misconfigured - and now I need to rewrite a string - however I cannot find out at all how to do this for urls with ? in them.

So I need to have:
www.velomap.org/de/?s2member_paypal_notify=1
rewritten to www.velomap.org/?s2member_paypal_notify=1
(note the /de missing).

I tried:
server { server_name www.velomap.org/de/?s2member_paypal_notify=1
return 301 $scheme://www.velomap.org/?s2member_paypal_notify=1$request_uri?;
}

but this is not accepted as valid nginx.conf...

So I need this rewritten and it is important that whatever string is following this is not lost...


(also - but less important) - how can I rewrite a specific url?
So I want to rewrite
www.velomap.org/de/
to www.velomap.org
- but only if it is exactly this url. www.velomap.org/de as well as www.velomap.org/de/* is not allowed to be rewritten...
Subject Author Posted

rewrite rule with ? in url

extremecarver April 28, 2015 04:21AM

Re: rewrite rule with ? in url

extremecarver April 28, 2015 04:54AM

Re: rewrite rule with ? in url

extremecarver April 28, 2015 05:05AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 124
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready