title: Codeigniter htaccess redirect to non-www
body: <p>I am using codeigniter.I want to redirect all users from www to non-www.
  I mean if user does a request to <code>http://www.example.com</code> it should be redirected to <code>http://example.com</code> or <code>http://www.example.com/url/1/2</code> to <code>http://example.com/url/1/2</code></p>
  
  <p>How can I achive this ? </p>
  
  <p><strong>My htacess code:</strong></p>
  
  <pre><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] 
  </code></pre>