Hi guys,
I want to configure 301 and 302 redirections on NGINX like we can do in Apache using RewriteMap. Per instance (Apache configuration)
```
RewriteEngine On
RewriteMap redirects txt:/opt/maps.txt
RewriteCond ${redirects:%{HTTP_HOST}%{REQUEST_URI}} ^.+$
RewriteRule .* http://${redirects:%{HTTP_HOST}%{REQUEST_URI}} [R=301,QSA,NE,L]
```
In this configuration, any change over /opt/maps.txt doesnt need any reload / restart
I tried to make the analog configuration in NGINX with map directive. Something like
```
map $request_uri $new_uri_301 {
include /etc/nginx/snippets/rewritemap.conf;
}
location / {
if ($new_uri_301) {
return 301 $new_uri_301;
}
}
```
The thing is that every change in /etc/nginx/snippets/rewritemap.conf require make a reload. Can we avoid that? There is a way to dynamically reload the configuration like in Apache?
King regards guys