WordPress.org

Forums

WordPress permalinks rewrite rules and Cyrillic (1 post)

  1. theduna
    Member
    Posted 3 years ago #

    Hello, im trying to setup up custom rewrite rules (like in http://codex.wordpress.org/Class_Reference/WP_Rewrite)

    My problem is with Cyrillic characters.
    Working string:
    $newrules['(project)/(А)/(\d*)$'] = 'index.php?pagename=$matches[1]&id=$matches[2]';
    (word with just one character)
    Non working strings:
    $newrules['(project)/([АБ])/(\d*)$'] = 'index.php?pagename=$matches[1]&id=$matches[2]';
    (2 cyrillic characters)
    Also dont work:
    [А-Я] (range of cyrillic)
    [\x{0400}-\x{04FF}] (range of unicode)

    It seems for me as some wordpress problem. Maybe someone can help me? And if i use test echo preg_match('/[\x{0400}-\x{04FF}]/u', $str); with cyrillic str it returns 1, so something with wordpress.

Topic Closed

This topic has been closed to new replies.

About this Topic