Welcome Guest, Not a member yet? Register   Sign In
config base_url url format
#1

[eluser]Ngulo[/eluser]
hi guys i was wondering why does codeigniter base_url in default config file is setted without www?

i mean normally i found $config['base_url'] = "http://site.com" instead of using $config['base_url'] = "http://www.site.com" Tongue

are there any differences between using www or not?


thanks
#2

[eluser]WanWizard[/eluser]
Yes, they are two different hosts.

You can't just remove (or add) "www", both hosts could be linked to different IP addresses, or being processed differently on the same IP.
i.e. http://example.com could be a completely different website from http://www.example.com. Whether that's a smart thing to do is a different story...
#3

[eluser]cideveloper[/eluser]
Although Ngulo is correct in the fact that they can point to different places, one would be insane to have 2 different pages on www and non www site. Usually both point to the same location. I have worked for a domain registrar and have had access to hundreds of thousands of DNS records and no one pointed them to different locations. The thing is choose one type and stick with it. According to google:

Quote:People access your site through several different URLs. If, for example, your home page can be reached in multiple ways - for instance, http://example.com/home, http://home.example.com, or http://www.example.com - it's a good idea to pick one of those URLs as your preferred (canonical) destination, and use 301 redirects to send traffic from the other URLs to your preferred URL.
#4

[eluser]Ngulo[/eluser]
ehm i think i understand i have only to choose if use or not www right?

so if use www.site.com all people are entering on my site by site.com (without www) should be redirected to www.site.com?

thanks guys
#5

[eluser]Ngulo[/eluser]
ehm i think i understand i have only to choose if use or not www right?

so if use www.site.com all people are entering on my site by site.com (without www) should be redirected to www.site.com?

thanks guys




Theme © iAndrew 2016 - Forum software by © MyBB