Redirect site.com to www.site.com automaticly |
[eluser]serhat[/eluser]
Hello, When i enter site.com the url bar has no www. in front of domain name automaticly. I want to do this automaticly for seo purposes. How can i do this? By the way in internal urls like "site.com/blabla" i want it to be as "www.site.com/blabla" automaticly. Thanks for help By the way This is my current htaccess Code: <IfModule mod_rewrite.c>
[eluser]Paul Rose[/eluser]
I have a system that manages multiple domains from the same CI installation. We simply set the CNAME of a domain to point where we want. Havig multiple domains meant I didnt want to edit the .htaccess every time we added a new domain in so this was the solution..... Code: RewriteCond %{HTTP_HOST} !^(www.*)
[eluser]serhat[/eluser]
It works great but with one problem now when i enter urls these are my responses in url bar url.com => www.url.com/ ->This is great www.url.com => www.url.com/ -> This is also great www.url.com/blablabla => www.url.com/blablabla This is also great url.com/balbalba = > www.url.com/index.php/blabla This is the problem . I already removed index.php from my website from config. And i changed htaccess settings for it as you can see.
[eluser]jurosik[/eluser]
hi, i'm using this code: Code: RewriteCond %{HTTP_HOST} ^domain.tld try it and let us know.. |
Welcome Guest, Not a member yet? Register Sign In |