I am using codeigniter.I want to redirect all users from www to non-www.
I mean if user does a request to http://www.example.com
it should be redirected to http://example.com
or http://www.example.com/url/1/2
to http://example.com/url/1/2
How can I achive this ?
My htacess code:
RewriteEngine On
RewriteCond %{REQUEST_URI} ^/system.*
RewriteRule ^(.*)$ index.php/?$1 [QSA,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+)$ index.php/?$1 [QSA,L]