Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Tue Sep 06, 2011 8:03 pm 
Offline
Junior Member

Joined: Tue Jul 05, 2011 8:56 am
Posts: 22
Location: http://colorgenetics.info
I have a multi-site drupal + multisite embedded gallery2 install. Everything has been working great until I decided to change my drupal multisite install to a sub-directory install vs a sub-domain type install.

I think this has to be related to the redirect rules because when I turn off the gallery2 clean url mod everything works fine. I have only a very vague understanding of how the redirect is working and got it working the first time by simply following the instructions =) I hope someone can help me out with this one.

the installation is colorgenetics.info/feline/gallery and colorgenetics.info/canine/gallery With the standalone gallery2 installs at colorgenetics.info/feline_gallery and colorgenetics.info/canine_gallery

the redirect rules are as follows to get the drupal install to work in the sub-directory this was necessary.
just for the feline site
Code:
   
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} ^/feline/(.*)$
RewriteRule ^(.*)$ /feline/index.php?q=$1 [L,QSA]

for the gallery2 installation just the feline site since the others should be similar
Code:
RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d [OR]
    RewriteCond %{REQUEST_FILENAME} gallery\_remote2\.php
    RewriteCond %{REQUEST_URI} !/gallery$
    RewriteRule .   -   [L]

    RewriteCond %{THE_REQUEST} /d/([0-9]+)\-([0-9]+)/([^/?]+)(\?.|\ .)
    RewriteCond %{REQUEST_URI} !/gallery$
    RewriteRule .   /feline_gallery/main.php?g2_view=core.DownloadItem&g2_itemId=%1&g2_serialNumber=%2&g2_fileName=%3   [QSA,L]
    RewriteCond %{THE_REQUEST} /feline/gallery/v/([^?]+)(\?.|\ .)
    RewriteCond %{REQUEST_URI} !/gallery$
    RewriteRule .   /gallery?g2_path=%1   [QSA,L]

And the .htaccess file from the feline_gallery folder
Code:
# BEGIN Url Rewrite section
# (Automatically generated.  Do not edit this section)
<IfModule mod_rewrite.c>
    RewriteEngine On

    RewriteBase /feline_gallery/

    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d [OR]
    RewriteCond %{REQUEST_FILENAME} gallery\_remote2\.php
    RewriteCond %{REQUEST_URI} !/feline_gallery/main\.php$
    RewriteRule .   -   [L]

    RewriteCond %{THE_REQUEST} /feline_gallery/d/([0-9]+)\-([0-9]+)/([^/?]+)(\?.|\ .)
    RewriteCond %{REQUEST_URI} !/feline_gallery/main\.php$
    RewriteRule .   /feline_gallery/main.php?g2_view=core.DownloadItem&g2_itemId=%1&g2_serialNumber=%2&g2_fileName=%3   [QSA,L]
    RewriteCond %{THE_REQUEST} /feline_gallery/gallery/v/([^?]+)(\?.|\ .)
    RewriteCond %{REQUEST_URI} !/feline_gallery/main\.php$
    RewriteRule .   /feline_gallery/main.php?g2_path=%1   [QSA,L]
</IfModule>

# END Url Rewrite section
I can turn off the gallery2 rewrite mod if I have must to get things working but I would rather not as that will of course break any links that are out there.

Edited to add: When the redirect enabled in gallery2 I can see the page at colorgenetics.info/feline/gallery but when I click on an album instead of going to the album the clean url link will show in the address bar but page that shows is the gallery home page. For example the url will show colorgenetics.info/feline/gallery/v/album but the page shown will be colorgenetics.info/feline/gallery If i try to go to a picture page directly I get a page not found error.

Thanks in advance for the help

_________________
Color Genetics


Top
   
 Post subject:
PostPosted: Thu Sep 08, 2011 9:07 pm 
Offline
Junior Member

Joined: Tue Jul 05, 2011 8:56 am
Posts: 22
Location: http://colorgenetics.info
no one has any suggestions on this?

_________________
Color Genetics


Top
   
 Post subject:
PostPosted: Sat Sep 10, 2011 2:06 pm 
Offline
Junior Member

Joined: Tue Jul 05, 2011 8:56 am
Posts: 22
Location: http://colorgenetics.info
Maybe even redirect the clean url's to the non-clean ones that currently work?

_________________
Color Genetics


Top
   
 Post subject:
PostPosted: Sat Sep 10, 2011 10:05 pm 
Offline
Junior Member

Joined: Tue Jul 05, 2011 8:56 am
Posts: 22
Location: http://colorgenetics.info
I just wanted to say that this has been resolved. The trick was to completely uninstall the gallery clean url plugin and reinstall everything as if it was a new installation. I wasn't necessary to uninstall the gallery 2 module in drupal just reset and go through the steps.

Many thanks to Dayo over at the Gallery forums for pointing this out.

_________________
Color Genetics


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group