Welcome! Log In Create A New Profile

Advanced

Re: apache rewrite to nginx

June 14, 2017 02:04PM
so far I have come up with the following but , I have been reading that using if statements is bad.
if ($http_host ~ "^rwa-(.*)"){
set $rule_0 1;
set $bref_2 $2;
set $bref_7 $7;
}
if ($http_host ~ "^m2m-(.*)"){
set $rule_0 1;
set $bref_2 $2;
set $bref_7 $7;
}
if ($http_host ~ "^dwa-(.*)"){
set $rule_0 1;
set $bref_2 $2;
set $bref_7 $7;
}
if ($rule_0 = "1"){
rewrite ^/(/ws/v[1-9]/dias/[^+]*)\+([^+]*)$ https://${host_finder:$http_host}/$1\$bref_2B$2https://$$bref_7bhost_finder:$bref_25$bref_7bHTTP_HOST$bref_7d$bref_7d/$1/$bref_2B$2 last;
}
if ($http_host ~ "^rwa-(.*)"){
set $rule_1 1;
set $bref_2 $2;
}
if ($http_host ~ "^m2m-(.*)"){
set $rule_1 1;
set $bref_2 $2;
}
if ($http_host ~ "^dwa-(.*)"){
set $rule_1 1;
set $bref_2 $2;
}
if ($rule_1 = "1"){
rewrite ^/(/ws/v[1-9]/dias/.*)\+(.*)$ /$1\$bref_2B$2;
}
if ($http_host ~ "^rwa-(.*)"){
set $rule_2 1;
Subject Author Posted

apache rewrite to nginx

Frank Dias June 12, 2017 04:16PM

Re: apache rewrite to nginx

Aleksandar Lazic June 12, 2017 06:22PM

Re: apache rewrite to nginx

frank3427 June 14, 2017 01:36PM

Re: apache rewrite to nginx

frank3427 June 14, 2017 02:04PM

Re: apache rewrite to nginx

Aleksandar Lazic June 14, 2017 04:28PM

Re: apache rewrite to nginx

frank3427 June 14, 2017 04:45PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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