Consider the following RewriteRules:
RewriteEngline On
RewriteRule ^services$ services.php
RewriteRule ^новости$ news.php
What they achieve is that www.example.com/services loads the content of services.php and www.example.com/новости loads the content of news.php. I would like to make the paths of both of those URLs case-insensitive. The English one could be done in one of three ways:
RewriteRule ^services$ services.php [NC]
RewriteRule ^[sS][eE][rR][vV][iI][cC][eE][sS]$ services.php
RewriteRule (?i)^services$ services.php
All three of the above work. They point all services paths to services.php regardless of case. Unfortunately, none of those approaches works for the rule with Cyrillic.
RewriteRule ^новости$ news.php [NC]
RewriteRule ^[нН][оО][вВ][оО][сС][тТ][иИ]$ news.php
RewriteRule (?i)^новости$ news.php
The first and third rules point ONLY www.example.com/новости to news.php. The second rule does literally nothing - it does not point ANY of the новости paths to news.php. It seems like when the square brackets are added, the Cyrillic characters within cease to exist. For example, the rule below points www.example.com/новостS to news.php but it DOES NOT point www.example.com/новости to it.
RewriteRule ^новост[иS]$ news.php
Finally, another thing that I have tried was to replace the Cyrillic characters with their UTF-8 representations - for example, replace [сС] with [\xd1\x81\xd0\xa1]. That did not work either.
Note: The rule below works as expected - it points both www.example.com/новости and www.example.com/НОВОСТИ to news.php. Unfortunately, I do not think it could be of use to me since it achieves the same as having two rewrite rules.
RewriteRule ^новости|НОВОСТИ$ news.php
The above is equivalent to:
RewriteRule ^новости$ news.php
RewriteRule ^НОВОСТИ$ news.php