Answer the question
In order to leave comments, you need to log in
How to replace a word in a URL?
Hello.
Please help me figure out Nginx.
There is a page address www.domain.ru/news/blog/2018/blablabla
How to change the address to www.domain.ru/news/blog/2018/tratata ?
Answer the question
In order to leave comments, you need to log in
Maybe something like this.
location ~* /news/blog/2018/blablabla {
rewrite ^ /news/blog/2018/tratata permanent;
}
I found the solution
rewrite ^/(.+)/blablabla$ /$1/tratata permanent;
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question