Home » Programming / Coding

Wordpress Update With Add-On Domain Causes Redirect to Main Url

24 April 2009 5,274 views 2 Comments

I use one hosting to host most of my smaller sites. Mainly because its easier to manage. Recently I wanted to upgrade my portfolio blog Boston Web Developer to most recent wordpress blog version 2.7.1. After fixing the wp_config file as I upload the files to the server I find the site it redirecting to the main url with the blog folder name in front of it.

I set up a folder for the add-on domain inside the public_html folder. So if my main url were www.mysite.com and add-on folder were myBlog, the blog is to redirect to www.mysite.com/myblog. In correct case it were to be www.myBlogDomain.com for example.

Digging through the files I found, the .htaccess file inside the blog folder had no content in it, well it had two lines without anything between them:

# BEGIN WordPress
# END WordPress

Also there were a .htaccess file in the main root folder which was setting the url to the main domain name. And thats what was part of the problem as well.

To correct the redirect problem the .htaccess file for the blog folder should have:

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

# END WordPress

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...

2 Comments »

  • Insiniday said:

    hiya everyone!
    was looking for something and i came across you guys. nice comunity u got here, I wanna be a part of it ^^

  • Jenny Kumar said:

    I really liked your post.

Leave your response!

Add your comment below, or trackback from your own site. You can also subscribe to these comments via RSS.

Be nice. Keep it clean. Stay on topic. No spam.

You can use these tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

This is a Gravatar-enabled weblog. To get your own globally-recognized-avatar, please register at Gravatar.