: Nginx request map and redirect have no effect I want to rewrite/return request to new one I have: map map $request $new_request { include url_rmap.conf; } file url_rmap.conf # here
I want to rewrite/return request to new one
I have:
map
map $request $new_request {
include url_rmap.conf;
}
file url_rmap.conf
# here i have tried all variations
$scheme://d.dom any.other/address $scheme://d.dom/ any.other/address https://d.dom any.other/address https://d.dom/ any.other/address
server block
server {
listen ip:port;
server_name a.dom b.dom aa.a.dom w.c.dom d.dom;
# first try
if($new_request) {
return 301 $new_request;
}
# also second with @redirect -nap
location / {
# Support Clean (aka Search Engine Friendly) URLs
try_files @redirect -map $uri $uri/ /index.php?$args;
}
location @redirect -map {
if ($new_request) { # redirect if the variable is defined
return 301 $new_request;
}
}
}
both ways with to call d.dom fail to redirect and have no effect. why?
More posts by @Bryan171
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.