![]() |
CodIgniter and htaccess rewrite rule question - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21) +--- Thread: CodIgniter and htaccess rewrite rule question (/showthread.php?tid=33904) |
CodIgniter and htaccess rewrite rule question - El Forum - 09-12-2010 [eluser]felyx[/eluser] Well I have the following htaccess file and it is working fine but I will explain below what my problem is. Code: RewriteEngine on What my problem is that I want to redirect http://www.somesite.com to http://somesite.com without ruining my actually working htaccess file/website. Anyone can give me a little help how could I put this rewrite rule into my htacces file without causing trouble? Thank you in advance! CodIgniter and htaccess rewrite rule question - El Forum - 09-13-2010 [eluser]pickupman[/eluser] Add this below RewriteEngine On Code: RewriteCond %{HTTP_HOST} !^www.somesite.com$ [NC] CodIgniter and htaccess rewrite rule question - El Forum - 09-13-2010 [eluser]felyx[/eluser] [quote author="pickupman" date="1284403007"]Add this below RewriteEngine On Code: RewriteCond %{HTTP_HOST} !^www.somesite.com$ [NC] Thank youvery much it works! CodIgniter and htaccess rewrite rule question - El Forum - 09-14-2010 [eluser]12vunion[/eluser] Add a line below RewriteEngine on Code: #no WWW The reverse also works Code: #Force WWW |