I have changed config file in opencart from http://mywebsite.in/ to http://www.mywebsite.in/ .
Now the problem is when i visit mywebsite.in, the website doesn't work. How can i redirect to www or http.
do i need to do something in library/url.php
public function link($route, $args = '', $secure = false) { if ($this->ssl && $secure) { $url = 'https://' . $_SERVER['HTTP_HOST'] . rtrim(dirname($_SERVER['SCRIPT_NAME']), '/.\') . '/index.php?route=' . $route; } else { $url = 'http://' . $_SERVER['HTTP_HOST'] . rtrim(dirname($_SERVER['SCRIPT_NAME']), '/.\') . '/index.php?route=' . $route; }
if ($args) {
if (is_array($args)) {
$url .= '&' . http_build_query($args);
} else {
$url .= str_replace('&', '&', '&' . ltrim($args, '&'));
}
}
Please help me. Thanks alot in advance.