Hi,
We have 5 sites now installed in the Multisite install. All seems well apart from the or Wordpress blog. This is installed in the root directory and seems to be the only way to get this to work for www.oursite.com/blog/
However, the blog is duplicated accross all the other domains on the multi-site install www.myothersire/blog/
Not good as this blog is now accessible on sites where it should not be and Google will eventually pick up in the duplication.
I have installed the robots.txt module and I have restricted the /blog/ from being indexed on domains it should not show up but this is somewhat of a poor solution.
Does anyone have any idea how to solve this? Also, is it possible to have a specific htaccess for each domain in a multi-site environment?
Thanks for any help,
dutchie
Comments
use Drupal for the blog
Why not just use Drupal for the blog on the one site that needs a blog.
Because I prefer the current
Because I prefer the current version of Wordpress to that of Drupal's blog. I have read that many other have this sort of issue and despite digging deep into Drupals archives I cannot see that anyone has found a solution to this.
multi-site setup question
There is more than one way to set up a multi-site installation. Can you briefly describer your file structure and rewrite rules for me?
I think what you need is definitely doable with apache rules.
Also, in your hosting environment can you edit your core httpd.conf file for apache?
You don't say how it all is
You don't say how it all is installed. Where is WordPress? If you have Apache you could have your directories setup like this:
drupal/ (with all the multi-sites inside)
wordpress/ (with only wordpress)
In the Apache virtual host that you want the blog to be using WP, you could use the Alias directive in mod.alias or something like that.
The other thing I can think of is defining a subdomain for wordpress in a different Apache virtual dir (i.e. http://blog.oursite.com/) pointed to a separate wordpress dir, but that's not what you want.
I have "hacked" a Drupal and
I have "hacked" a Drupal and a WP test setups of mine here and it works ... partially.
I did what I stated below, and in WP "WordPress address" and "blog address" (General options) I entered http://oursite.com/blog.
All the admin stuff works out of the box. The content is "canibalized" by Drupal.
All I had to do for everything to work was to update the Rewrite rules in WP. I went to the permalinks options and got this:
RewriteEngine On
RewriteBase /blog/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /blog/index.php [L]
Which only differs in those two highlighted lines (obvious).
Modified my .htaccess in WP and voilà!
Hope that helps.
PS: My Drupal site is not multisite setup (I only have a site) but this main site is setup as such, so I don't see how this would not work for you.
As for multiple htaccess files ...
"Also, is it possible to have a specific htaccess for each domain in a multi-site environment?"
I have not found anything on Google about this for Drupal, but I figured out a way (again with Apache). Have not tried it, but I would imagine this would work:
http://httpd.apache.org/docs/1.3/howto/htaccess.html
If you want to call your .htaccess file something else, you can change the name of the file using the AccessFileName directive.
So put "AccessFileName .htaccess_oursite_com" in your Apache virtual config for oursite.com and add .htaccess_oursite_com in your base Drupal directory and that would pick it up. Do the same with .htaccess_myothersite_com (and the others) and you should have it.
Shouldn't it?
However, for your original question, you shouldn't need this.
As for multiple htaccess files ...
Sorry, double posting.
As for multiple htaccess files ...
Sorry, triple posting. Please don't blame me.
;-)
our mulitple site setup up on
our mulitple site setup up on an apache dedicated server for which our host will set it up as required
/drupal-installation/
/drupal-installaiion/wordpress-blog/
.htaccess
/drupal-installation/.htaccess
Sites are installed in the normal way
/drupal-installation/sites/default
/drupal-installation/sites/site1
/drupal-installation/sites/site2
/drupal-installation/sites/site3
In Cpanel I have all URLs pointing to the /drupal-installation/
htaccess is as follows:
Thanks alot for your assitance,
dutchie
What I did was a bit
What I did was a bit different. Like I said, I have WP and Drupal setup in different directores, not WP inside Drupal, as you describe.
Summing up, all I needed for this to finally work as you wanted is:
1. Adding
Alias /blog "/var/www/wordpress"(where WordPress is installed) to the Drupal virtual server config in Apache.2. Modifying "WordPress address" and "blog address" in the General options.
3. Modifying the .htaccess used by WordPress.
I'm not 100% sure if that would work with WordPress inside the Drupal dir as you mention, but if you try and it does not, you could always get WP out of Drupal's path (better for upgrading Drupal in the future, I think). I don't think you would even need a WordPress virtualdir defined for it to work.