• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Fixed  SEO URLs with cyrillic and Apache 1.3 (possible fix inside)

Romchik®

Well-known member
#1
We have installed XenForo and have clarified that at a forum there is an error in links with cyrillic characters. Threads with such links did not open, since there was an infinite readdressing.

Our hosting has prompted following solution:
In case of Apache 1.3 and cyrillic characters these variables though contain the identical data, but are output in different registers:

Code:
threads/%d0%a2%d0%b5%d1%81%d1%82-%d0%be%d0%bf%d1%8f%d1%82%d1%8c.5/
threads/%D0%A2%D0%B5%D1%81%D1%82-%D0%BE%D0%BF%D1%8F%D1%82%D1%8C.5/
And though links are identical, in urlencode they will not be equal. Here a patch made by us for solution of this problem:

*** library/XenForo/Controller.php Tue Oct 26 11:49:00 2010
--- library/XenForo/Controller.php Tue Oct 26 11:51:18 2010

***************

*** 615,621 ****
Code:
            //$linkParams = isset($parts[1]) ? $parts[1]: false;
        }

        if ($requestUrlPrefix != $linkUrlPrefix)
        {
            $redirectUrl = $linkUrlPrefix;
            if ($requestParams !== false)
--- 615,621 ----
Code:
            //$linkParams = isset($parts[1]) ? $parts[1]: false;
        }

        if (urldecode($requestUrlPrefix) != urldecode($linkUrlPrefix))
        {
            $redirectUrl = $linkUrlPrefix;
            if ($requestParams !== false)
It has resolved problem with our links.

What do you think?
 

Pepelac

Well-known member
#3
I have to correct Romchik, post, that he posted was a translation of his conversation with some customer, that had this problem. We (xf-russia.ru) are using apache2.
But there are (without any doubts) some hosting providers, who still offers old apache for their customers, and there is no way to upgrade it (or change hosting provider).