Project

General

Profile

Bug #807

parseUrl does not work for domains ending with www

Added by Vasily Bezruchkin over 6 years ago. Updated over 6 years ago.

Status:
Resolved
Priority:
Normal
Category:
Core
Target version:
Start date:
May 06, 2013
Due date:
% Done:

100%

Estimated time:

Description

Example: domainwww.com will not work, there is a redirect loop.

        $requestPath = preg_replace('#^\/#', '', $_SERVER['REQUEST_URI']);

        if (!preg_match('/www\./', $domain) && preg_match('/:\/\/www\./', $this->iaCore->get('baseurl')))
        {
            $domain = preg_replace('/^/', 'www.', $domain);
            iaCore::util();
            iaUtil::go_to('http://' . $domain . IA_URL_DELIMITER . $requestPath);
        }
        elseif (preg_match('/www\./', $domain) && !preg_match('/:\/\/www\./', $this->iaCore->get('baseurl')))
        {
            $domain = preg_replace('/^www\./', '', $domain);
            iaCore::util();
            iaUtil::go_to('http://' . $domain . IA_URL_DELIMITER . $requestPath);
        }

History

#1

Updated by Batyr Mackenov over 6 years ago

  • Status changed from New to Resolved
  • % Done changed from 0 to 100

fixed. commit:34c62de

Also available in: Atom PDF