I’m stuck with a problem as I can’t find the reason causing such a behaviour.
The problem in short:
I have a site. When I go to http://mysite.com – loads fine. The url doesn’t change.
When I go to http://www.mysite.com – redirects to http://mysite.com/index.php/
Initially I had some rules in .htaccess, but now – I commented all of them, so the behaviour is reproduced with clean .htaccess.
In config of codeigniter I have:
$config['base_url'] = "http://mysite.com/";
$config['index_page'] = "";
I checked the apache config – didn’t find any redirects that could behave like this.
Any thoughts where to dig?
That was pretty stupid from my side – but just put it here, maybe for someone else that would help not to spend too much time as I did.
The problem was that I worked with local version of site, and recently has changed the hosts file. Now there was 127.0.0.1 written only for main domain, but not for subdomains.
So basically when I entered http://www.site.com I downloaded from the production version of site.
Really stupid mistake.