WPG2 settings for gallery on another vhost
I installed the WordPress Gallery2 plugin for my other blog. The default installation does not quite work for me since my gallery is accessed via a different vhost even though they’re both on the same machine, i.e., http://blog.ibao.net/notes points to /var/www/ibao.net/blog/notes and http://gallery.ibao.net points to /var/www/ibao.net/gallery.
To get around it I specified the “Embedded Path prefix” in the gallery2 plugin options to be “gallery”, so that links to gallery would be in the form of http://blog.ibao.net/gallery/notes/path/under/gallery. I then redirect everything under gallery/notes/ on blog.ibao.net to gallery.ibao.net in the .htaccess file, i.e.,
redirectMatch 301 ^/gallery/notes/(.*) http://gallery.ibao.net/$1
Now it should work.
As a reference here are my full embedded paths configuration:
Relative Gallery2 Path= ../../gallery/ Embed Gallery2 Page Name= wp-gallery2.php Path from web document root= /notes/ Gallery Error Redirect= http://blog.ibao.net/notes/index.php Document Root Path= /var/www/ibao.net/blog Embedded Path prefix= gallery
2 Responses to “WPG2 settings for gallery on another vhost”
Leave a Reply
You must be logged in to post a comment.
February 19th, 2006 at 2:08 pm
Note that WP / G2 on different subdomains will be a lot easier in G2.1. The G2 Embedding interface allows now for this configuration and I believe the new beta integratin of WPG2 exposes this new feature too. There’s no relativeG2Path etc anymore, just a g2Uri and a embedUri, both can be absolute.
On another note, I like your whole website very much, my compliments.
Cheers,
A fellow ETH student, G2 developer (aka valiant)
February 20th, 2006 at 12:20 pm
Confirming Valiant’s comments, WPG2 2.x and Gallery2 2.1 work very well on seperate subdomains. Nice work, very nice piece of intergration