Answer the question
In order to leave comments, you need to log in
How to correctly write rewriterule for Cyrillic?
Everything works in Latin:
RewriteRule ^text/([a-zA-Z]+)/?$ /app/text/detail.php?t=$1
Answer the question
In order to leave comments, you need to log in
\p{Cyrillic}
https://www.php.net/manual/ru/regexp.reference.uni...
And if you need not only Cyrillic, then \p{L}
.
If you use [а-яёА-ЯЁ]
, then the file must be saved in UTF-8 without BOM.
Another option.
RewriteRule ^text/((?:\xd0[\x81\x90-\xbf]|\xd1[\x80-\x91])+)/?$ /app/text/detail.php?t=$1 [L]
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question