Goal:

Separating Gallery2 and Drupal by URL, using different Subdomains:

http://gallery2.domain.com
http://drupal.domain.com
Show Item Rule: %path%

I've almost reached that goal by separating Gallery and Drupal navigation from each other. Currently I have the choice between two variants, each with its pro's and con's. I'd like to use the more elegant variant 2, but there is a problem with the hostname due to relative links in Gallery Block/Gallery Grid Block.

Current status (variant 1):

http://gallery2.domain.com
http://drupal.domain.com
Show Item Rule: galerie/%path%

Pro: All things works fine.
Con: Links look like this: http://gallery2.domain.com/galerie/pathandimage.htm

Current status (variant 2):

http://gallery2.domain.com
http://drupal.domain.com
Show Item Rule: %path%

Pro: Links look good, e.g. http://gallery2.domain.com/pathandimage.htm
Con: I have to disable Gallery Block and Gallery Grid Block in Drupal because links to the images don't work -> http://drupal.domain.com/pathandimage.htm

Variant 2 in action:
Gallery2: http://galerie.takera.net
Drupal: http://bibliothek.takera.net

Possible Solution:

Add an Optional Gallery Domain to your module settings and using absolute links in the Blocks: So the links to Gallery Items in the Gallery Block/Gallery Grid Block are like this
http://OptionalGalleryDomain.com/pathandimage.htm instead of http://drupal.domain.com/pathandimage.htm

The .htaccess file only needs an additional {HTTP_HOST} condition before each gallery2 rewrite rule. So a gallery2 rewrite rule in drupal's .htaccess could look like this (first line added by me, the others are default gallery2 lines):

    RewriteCond %{HTTP_HOST} OptionalGalleryDomain.com$ [NC]
    RewriteCond %{THE_REQUEST} /([^?]+)(\?.|\ .)
    RewriteCond %{REQUEST_URI} !/index\.php$
    RewriteRule .   /index.php?q=gallery&g2_path=%1   [QSA,L]

What do you think about it? Should be easy to implement and gives much more freedom for the webadmin to design the look how his visitors should see the interaction between gallery2 and drupal.