Re: How setting htaccess for redirect http://example.com to http://www.example.com

2009-09-21 Thread Petr Vytlačil
Thank you, I will try it. Bye P.V. On 20 zář, 13:30, midas wrote: > Try this: > > Non-www to www: > > RewriteCond %{HTTP_HOST} !^www\. > RewriteRule (.*)http://www.%{HTTP_HOST}/$1 [R=301,L] > > www to non-www: > > RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC] > RewriteRule ^/(.*)$ http://%1/$1 [R=30

Re: How setting htaccess for redirect http://example.com to http://www.example.com

2009-09-20 Thread midas
Try this: Non-www to www: RewriteCond %{HTTP_HOST} !^www\. RewriteRule (.*) http://www.%{HTTP_HOST}/$1 [R=301,L] www to non-www: RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC] RewriteRule ^/(.*)$ http://%1/$1 [R=301,L] Bonus tip: Remove trailing slash from address line RewriteRule ^(.+)/$ http://

RE: How setting htaccess for redirect http://example.com to http://www.example.com

2009-09-20 Thread Dave Maharaj :: WidePixels.com
I have this in my webroot htaccess: RewriteEngine On RewriteCond %{HTTP_HOST} ^mysite\.com$ RewriteRule (.*) http://www.mysite.com/$1 [R=301,L] RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ index.php?url=$1 [QSA,

How setting htaccess for redirect http://example.com to http://www.example.com

2009-09-20 Thread Petr Vytlačil
How setting htaccess for redirect http://example.com to http://www.example.com and where in dir structure cakephp. THX --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this g