I want to redirect mysite.com
or http://mysite.com
or www.mysite.com
or any other format given my user to http://www.mysite.com
, I'm able to achieve this by rewriting following lines in my .htaccess
file
Rewritecond %{http_host} ^mysite.com
RewriteRule ^(.*) http://www.mysite.com/$1 [R=301,L]
But I want do this from Apache
,So I've added following line in Virtual host conf file of the site
and removed above two lines from .htaccess
Redirect 301 / http://mysite.com/
But whenever I'm trying to access the site following error is displyaing,
Error 310 (net::ERR_TOO_MANY_REDIRECTS): There were too many redirects.
where I'm doing the wrong ?
/
then its working as expected. – Mahesh.D 2 days ago