Rewrite URL with parameters
Raphael R. O.
rabeloo at gmail.com
Thu Dec 5 17:09:06 UTC 2013
Hi guys,
I'm trying to rewrite an url with a few parameters, but unsuccessfully.
The URL:
https://www.mysite.com.br/category-body/categories/promotionalXXX?utm_source=PromoCode&utm_medium=AddPromo&utm_campaign=PromoCode_AddPromo_moneycampaing
I need rewrite to:
https://www.mysite.com.br/digital-parts/newspaper/recs-xyaw-sazz-qqad-cxae
The /promotionalXXX can be /promotional123, /promotional324 and many more
...
What i already tried:
rewrite
^/category-body/categories/promotional(.*)utm_source=PromoCode&utm_medium=AddPromo&utm_campaign=PromoCode_AddPromo_moneycampaing
https://www.mysite.com.br/digital-parts/newspaper/recs-xyaw-sazz-qqad-cxae;
and ...
location = /category-body/categories/promotional(.*)$ {
if ($args ~
“utm_source=PromoCode&utm_medium=AddPromo&utm_campaign=PromoCode_AddPromo_moneycampaing”)
{
rewrite ^/digital-parts/newspaper/recs-xyaw-sazz-qqad-cxae; permanent;
}
}
But any of this worked for me...
What's the best way to solve this?
Thanks!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20131205/6392e97d/attachment-0001.html>
More information about the nginx
mailing list