K
K
Kostushko2017-10-26 20:04:15
Nginx
Kostushko, 2017-10-26 20:04:15

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

2 answer(s)
B
Boris Korobkov, 2017-10-26
@Kostushko

Try rewrite ^/\x25E3$ ...orrewrite (*UTF8)^/\x25E3$ ...

A
Alexander, 2017-10-26
@zkelo

Try%%

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question