I have the following rules in my .htaccess file, I want to know how can I rewrite my URLs from www.mydomain.com to mydomain.com, I'm using Kohana 3.2 and haven't found info about it.
RewriteEngine On
RewriteBase /
RewriteRule ^(?:application|modules|system)\b.* index.php/$0 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* index.php/$0 [PT]
I have tried the following:
RewriteEngine On
RewriteBase /
RewriteRule ^(?:application|modules|system)\b.* index.php/$0 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{HTTP_HOST} ^mydomain.com [NC]
RewriteRule ^(.*)$ http://mydomain/$1 [L,R=301,NC]
RewriteRule .* index.php/$0 [PT]
But it results into "too many redirects"