im want to ask about 301 redirect example my site is domain.com and already using 301 redirect to www.domain.com im write domain.com it can redirect to www.domain.com but when im write domain.com/blog it was redirect to www.domain.com/blog and redirect again to domain.com/blog and again....and error so cannot access that webpage im installing wordpress to in my domain.com/blog/ my firefox is showing me an error page like can someone help please to solve this problem thanks before
Just use this code RewriteCond %{HTTP_HOST} !^www.yourdomain.com$ RewriteCond %{HTTP_HOST} ^yourdomain.com$ RewriteRule ^(.*) http://www.yourdomain.com/$1 [L,R=301]