How to 301 redirect non-www to www url |
[eluser]senz[/eluser]
Hi all, I want to redirect my website from non-www to www url and i got some code like this : RewriteCond %{HTTP_HOST} ^yoursite.com$ RewriteRule ^(/)?(.*) http://www.yoursite.com/$2 [R=301,L] I had change my htaccess file with adding that code, but when i write the address : mysite.com, the redirect is going fine and be like this : www.mysite.com. And when i click some page : www.mysite.com/about, my website is going like this : www.mysite.com/index.php/about. My question is, how to remove "index.php" from the address of my website and i had change the existing configuration in config.php file ($config['index_page'] = "index.php";) to be ($config['index_page'] = "" ![]() Thanks, Senz
[eluser]Mischievous[/eluser]
Code: RewriteEngine on found @ http://ellislab.com/codeigniter/user-gui.../urls.html |
Welcome Guest, Not a member yet? Register Sign In |