Welcome! Log In Create A New Profile

Advanced

Nginx redirection

May 16, 2018 02:22AM
Hi,

I have a nginx server (called mynginxserver) and need to redirect some urls :

I want to have all url with the string tso:

http://www.mynginxserver.com/XXXXXXtsoXXXXX

redirected to

https://myserver.com/XXXXXXtsoXXXXX

if the string tso is in the url and redirect to

http://www.mynottsoserver.com/XXXXXXXXXXX

if the string tso is not present.

XXXXXXtsoXXXXX and XXXXXXXXXXX must be keep.
The string "tso" can ben anywhere in the last parameter (tsoXXXXX, XtsoXXXX, XXXXtso, etc.)

I think i need to use the location and rewrite directive but don't know how to do that.

Thanks for your help
Subject Author Posted

Nginx redirection

Enrico May 16, 2018 02:22AM

Re: Nginx redirection

Aleksandar Lazic May 23, 2018 11:02AM

Re: Nginx redirection

Enrico June 14, 2018 09:27AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 122
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready