T
T
Templar3d2021-08-10 20:59:12
Nginx
Templar3d, 2021-08-10 20:59:12

nginx redirect. How to remove redundant url 404 errors?

Made the site example.com redirect to example.com/my/test/direct?$args instead of 404.
It works and passes the parameter (important), for example, if you go to example.com/my-my?blabla will redirect to example.com /my/test/direct?blabla

error_page  400 402 403 404 500 502 503 504  @err;
location @err {
return 301 /my/test/direct?$args;
}


On the site example. org has a redirect that redirects to example.com.
But when you go to, it example.org/my-my?code007redirects to
example.com/my/test/direct?blabla:Proxy&clickid:404;http://example.org:80/my-my?code007


How to get example.com/my/test/direct?blabla when going from example.org/my-my?blabla?
That is, what would be removed during the transition in example.com/my-my?blabla:Proxy&clickid:404;http://... and only example.com/my/test/direct?blabla remains ?

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