Answer the question
In order to leave comments, you need to log in
NGINX How to create a redirect like https://mysite.com/yabloki/$requvest_uri https://yabloki.mysite.com/?
Hello
How to create a view redirect
https://mysite.com/yabloki/$requvest_uri -> https://yabloki.mysite.com/
Answer the question
In order to leave comments, you need to log in
one.
location /yabloki/ {
rewrite ^/yabloki/(.*) http://yabloki.mysite.com/$1 permanent;
return 403;
}
server {
listen 80;
server_name example.com;
location ~ ^/products/(.*)$ {
proxy_pass http://catalog.example.com/$1;
}
}
server {
# ...
server_name domain.tld www.domain.tld;
return 301 $scheme://subdomain.domain.tld$request_uri;
}
server {
server_name subdomain.domain.tld;
# ...
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question