redirection
redirection copied to clipboard
Nginx Rewrite Rules are URL Encoded and not Usable
Summary
wp redirection export all redirects.conf --format=nginx same as the manual export from the GUI are producing not usable Rewrite rules.
Actual Behavior
Produces in 5.3.4:
rewrite (?i)^/%28e5%7Cservers-for-open-source%29/?%28\.%2A%29$ /servers/ permanent;
vs. in 5.2.3:
rewrite (?i)^/(e5|servers-for-open-source)/?(.*)$ /servers/ permanent;
This is not expected or desired behavior. Nginx is working with normalized $uri variable and can not match "%xx" encoded text. Please see relevant Nginx documentation.
Steps to reproduce
For example, try to export and use a regex redirect containing (, ) or |.
Environment
Redirection 5.3.4 on WP 6.0.3 Browser is irrelevant in this case.