Answer the question
In order to leave comments, you need to log in
How to escape percent character (%) in nginx rewrite rule?
Hello!
Tell me how to escape the percent character (%) in the rewrite rule for nginx?
Simplified example: The
example does not work, but if you remove the percentage, then /E3 redirects (ie, the error is in the % symbol). The variant with such escaping - ^/\%E3$ - doesn't work either.
UPD:
Working version:rewrite ^/%E3$ https://site.ru/url.html permanent;
rewrite ^/\xE3$ https://site.ru/url.html permanent;
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question