T
T
tutnet2014-06-10 22:11:02
Nginx
tutnet, 2014-06-10 22:11:02

How to properly write a rewrite for nginx

There are urls:
mydomain.com/1/shit/bla/
mydomain.com/1/shit/bla/bla
you need to correctly redirect them to
mydomain.com/bla/
mydomain.com/bla/bla
How to properly write nginx rewrite in this case -y

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Andrey Burov, 2014-06-10
@tutnet

rewrite ^/1/shit/(.*)$ /$1 permanent;

M
Maksim Zverev, 2014-06-10
@m1skam

Doesn't Google give a definitive answer?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question