WordPress.org

Ready to get started?Download WordPress

Forums

mod_rewrite with second blog on subdomain? (2 posts)

  1. Kerim
    Member
    Posted 10 years ago #

    While I have the mod_rewrite rules working fine on my main WP install, I find it wrecks havoc with various subdomains and software installed in subdirectories on my main site. In order to fix this, I've had to create ".htaccess" files in each of these subdomains/directories with the text: "RewriteEngine Off". I've even thrown one into the /wp-admin folder, and it seems to help with some weird behavior it was exhibiting. However, and this is where I am having trouble, I want to have Nice Archives on my second WP blog, installed on a subdomain. The problem is, if I turn the RewriteEngine On, it starts messing everything up, no matter what I do. Is there some way I can set the top level .htaccess file to ignore specific folders, so that I can turn the Rewrite Engine On in this folder? Or can I write the RewriteEngine rules in such a way that they tell it to ignore instructions from the top level domain?
    Thanks for your help!

  2. MattRead
    Member
    Posted 10 years ago #

    I'm not sure, but if you put :
    RewriteEngine On
    RewriteBase /blog/
    Won't it only apply the rules to the folder /blog/ ??
    Also I think if you put something like this you can get it to work in subdomains:
    RewriteCond %{REMOTE_HOST} ^host1.*
    RewriteRule ...some special stuff for this host...
    Try this URL for more info:
    http://httpd.apache.org/docs/mod/mod_rewrite.html.en#RewriteCond

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.