I have installed a wordpress blog on my site, but I get an infinite loop error when I try to access it. I believe the problem is in my .htaccess, and hope someone here can help. In my .htaccess I have all non www urls redirected to www. I also have a 301 redirect of index.php redirected to www. mysite .com. Here is my .htaccess # -FrontPage- IndexIgnore .htaccess */.??* *~ *# */HEADER* */README* */_vti* <Limit GET POST> order deny,allow deny from all allow from all </Limit> <Limit PUT DELETE> order deny,allow deny from all </Limit> AuthName www.mysite.com AuthUserFile /home/public/public_html/_vti_pvt/service.pwd AuthGroupFile /home/public/public_html/_vti_pvt/service.grp Options +FollowSymLinks RewriteEngine On RewriteCond %{HTTP_HOST} ^mysite\.com$ RewriteRule ^(.*)$ http://www.mysite.com/$1 [R=301,L] RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.php\ HTTP/ RewriteRule ^index\.php$ http://www.mysite.com/ [R=301,L] Code (markup): How can I write the .htaccess, so that I can keep my current redirects legit, and also still have my blog at www. mysite .com/blog. thanks in advance for the help.
I'm no expert with .htaccess but this seems illogical as the index file is the first file to be accessed, and if you've got it redirecting to www. mysite .com then that will be causing the loop. Try it without that last line and share your results.
Thanks for the reply. the only thing that helps is to remove the redirect of non www to www. by removing that redirect, it fixes the problem of the loop when accessing the blog. However, I need the www redirect. Possibly I have it written incorrectly?
I would research other ways of achieving that effect. I guess it's clashing with the other content in your .htaccess file.
You should remove those redirects from your .htaccess and use WordPress to make the redirects for you. The latest versions of WordPress will automatically redirect to www. if you configured your WP URL that way (or the other way round), and you can also exclude the "index.php" part. You might have to update your permalinks to get everything to work. And did you omit this WordPress part of the htaccess file? # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> # END WordPress Code (markup): Let me know if I can help.