Welcome! Log In Create A New Profile

Advanced

Rewrite URL with parameters

Raphael R. O.
December 05, 2013 12:10PM
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!
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Rewrite URL with parameters

Raphael R. O. December 05, 2013 12:10PM

Re: Rewrite URL with parameters

Jonathan Matthews December 05, 2013 12:26PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 126
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