Question : Redirect mod_rewrite killed my Blog?

I added the below code to my htaccess file to handle the problems associated with:

http://www.mysite.com
http://mysite.com

www.mysite.com/index.php
www.mysite.com/

However, I have a wordpress blog that is located at mysite.com/blog
Without the mod_rewrite enabled when I type http://www.mysite.com/blog  it always redirects to
http://mysite.com/blog

After enabling the mod_rewrite I've tried both and get an error.  Something to the effect of:

"The browser has stopped trying to retrieve the requested item. The site is redirecting the request in a way that will never complete."

Obviously the mod_rewrite caused this behavior, but I'm thinking that Wordpress might be playing a part in the problem.

It might help to mention I created a directory called blog and placed the index.php for Wordpress into it and added :  require('../wordpress/wp-blog-header.php'); to get it to work with the original install directory of wordpress.

Any Help is Greatly Appreciated.

Dan
Code Snippet:
1:
2:
3:
4:
5:
6:
7:
8:
9:
## The basics to get mod_rewrite going ####################
#RewriteBase /
RewriteEngine On
RewriteCond %{THE_REQUEST} /index\.php [NC]
RewriteRule ^(.*/)?index\.php$ /$1 [R=301,L]
 
RewriteCond %{HTTP_HOST} ^inptech.com [NC]
RewriteRule ^(.*)$ http://www.inptech.com/$1 [L,R=301]
###########################################################
Open in New Window Select All

Answer : Redirect mod_rewrite killed my Blog?

have you checked the blog url in wp settings?
what you are experiencing is an infinite loop as a result of the redirect, wp has a basic site url reference built in you probably need to update it to the path you want

most likely it is set as
http://mysite.com/blog
and with your rewrite it is trying to make it
http://www.mysite.com/blog
then wp tries to make it
http://mysite.com/blog
which will then loop

go to wp admin
then settings and update your blog url
Random Solutions  
 
programming4us programming4us