C
C
Counter2018-11-16 22:47:54
Nginx
Counter, 2018-11-16 22:47:54

Double tail on 301 redirect in nginx?

The task is to make a redirect from site1.ru/?md=name_my to https://site2.ru/?md=name_my
The tail must be taken from the first domain and transferred to the second. Everything seems to be simple, we do a standard permanent redirect. But for some reason, the tail is doubled.
Those. redirecting from site1.ru ?md=name_my redirects to https://site1.ru/ ?md=name_my?md=name_my
What am I doing wrong?
ngixn config:

listen      000.000.000.000:80;
    server_name site1.ru www.site1.ru;
    rewrite ^ https://site2.ru$request_uri permanent;

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question