I need to add a NGINX rewrite to replace "İ" (Capital I with dot on top) with a regular "i" in URLs with following pattern:
I was able to capture "İ" with (?:[\x{130}]) as follows:
https://regex101.com/r/ZfWlGa/1
When translated to NGINX rewrite as follows. It does not work.
rewrite (.)(?:[\x{130}])(.) $1i$2 permanent;
Also tried the opposite approach, that is to find non-ASCII characters and replace with "i" as follows. It does not work either.
https://regex101.com/r/VxBB30/1
What is correct way to do it?
I don't think Nginx regular expression syntax supports the Unicode code point notation. You can instead write the code point as two octets. U+0130 is represented in UTF8 as the two octets C4 and B0.
For example:
rewrite ^(.*)\xC4\xB0(.*)$ $1i$2 permanent;