Всем привет!
Есть конфиг:
server {
listen 80;
server_name domen.com;
location /ua/articles/article1/ { return 301 https://domen.com/blog-item/article1/; }
location /ua/articles/article2/ { return 301 https://domen.com/blog-item/article3/; }
...
location / { return 301 https://domen.com; }
}
server {
listen 80;
server_name www.domen.com;
return 301 https://domen.com;
}
server {
listen 443 ssl;
server_name www.domen.com;
ssl_certificate ...;
ssl_certificate_...;
return 301 https://domen.com;
}
server {
listen 443 ssl;
server_name domen.com;
root /.../public;
ssl_certificate ...;
ssl_certificate_key ...;
...
}
Проблема в:
location /ua/articles/article1/ { return 301 https://domen.com/blog-item/article1/; }
путь в location не определяеться, редирект не происходит, а пытаеться зайти на https://domen.com/ua/articles/article1...
перепробовал уже регулярки в location =, ~*, ... не работает.
куда смотреть?