{"action":"closed","issue":{"url":"https://api.github.com/repos/modxcms/Redirector/issues/48","labels_url":"https://api.github.com/repos/modxcms/Redirector/issues/48/labels{/name}","comments_url":"https://api.github.com/repos/modxcms/Redirector/issues/48/comments","events_url":"https://api.github.com/repos/modxcms/Redirector/issues/48/events","html_url":"https://github.com/modxcms/Redirector/issues/48","id":85501014,"number":48,"title":"Problems with cyrillic URLs","user":{"login":"whitebyte","id":7704186,"avatar_url":"https://avatars.githubusercontent.com/u/7704186?v=3","gravatar_id":"","url":"https://api.github.com/users/whitebyte","html_url":"https://github.com/whitebyte","followers_url":"https://api.github.com/users/whitebyte/followers","following_url":"https://api.github.com/users/whitebyte/following{/other_user}","gists_url":"https://api.github.com/users/whitebyte/gists{/gist_id}","starred_url":"https://api.github.com/users/whitebyte/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/whitebyte/subscriptions","organizations_url":"https://api.github.com/users/whitebyte/orgs","repos_url":"https://api.github.com/users/whitebyte/repos","events_url":"https://api.github.com/users/whitebyte/events{/privacy}","received_events_url":"https://api.github.com/users/whitebyte/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-06-05T10:26:17Z","updated_at":"2015-09-12T16:39:03Z","closed_at":"2015-09-12T16:39:03Z","body":"Currently Redirector doesn't handle cyrillic URLs nicely. When trying to process cyrillic URL it spits something like this\r\n```\r\nError parsing condition with key 0: ('%D0%BD%D0%BE%D0%B2%D0%BE%D1%81%D1%82%D0%B8/' REGEXP `modRedirect`.`pattern` OR '%D0%BD%D0%BE%D0%B2%D0%BE%D1%81%D1%82%D0%B8/' REGEXP CONCAT('^', `modRedirect`.`pattern`, '$'))\r\n```\r\ninto the log, and always redirect using the first rule in the  redirect list.\r\n\r\nI think the reason is that cyrillic URLs are \"rawurlencoded\", and instead of nice url, say, \"новости/\", Redirector plugin recieves something like this: \"%D0%BD%D0%BE%D0%B2%D0%BE%D1%81%D1%82%D0%B8/\".\r\n\r\nThe quick fix is to replace line 15 in the Redirector plugin, instead of\r\n```\r\n$search = $_SERVER['REQUEST_URI'];\r\n```\r\nit should be\r\n```\r\n$search = rawurldecode($_SERVER['REQUEST_URI']);\r\n```\r\nI don't see any immediate side effects, didn't tested it carefully though, so no PR for now."}}