redirection icon indicating copy to clipboard operation
redirection copied to clipboard

Nginx Rewrite Rules are URL Encoded and not Usable

Open aidik opened this issue 3 years ago • 0 comments

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

image_2022-10-30_20-57-21

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.

aidik avatar Oct 30 '22 23:10 aidik