Answer the question
In order to leave comments, you need to log in
How to compose rewrite nginx?
Hello,
there is a domain and a site with a forum on it: http://site.ru/forum/viewforum.php?f=4
it is moving to a new domain, and the forum has moved to the root http://newsite.ru/viewforum.php?f=4
How to rewrite? Help me please.
Answer the question
In order to leave comments, you need to log in
On the old domain do ^
location ~ ^/forum/(.*)$ {
return 301 http://newsite.ru/$1$is_args$args;
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question