rewrite redirect issue in debian squeeze
- by hd01
My server os is debian squeeze. I have these lines to redirect non-www to www in htaccess file of my website:
RewriteCond %{HTTP_HOST} !^www\.example\.com$ [NC]
RewriteRule ^(.*)$ http://www.example.com/$1 [L,R=301]
but it cause this error in firefox:
The page isn't redirecting properly
Firefox has detected that the server is redirecting the request for this address in a way that will never complete.
This problem can sometimes be caused by disabling or refusing to accept
cookies.
when I comment those lines in htaccess mysite appears but in non-www format.
I'm sure it works well before on the Ubuntu . but I don't know why it doesn't work now.
would you help me?