Drupal 5.2
Gallery 2.2.3
Main Site: http://www.parkingdenied.com /home/username/parkingdenied.com
Gallery Site: http://gallery.parkingdenied.com /home/username/gallery.parkingdenied.com
Initial setup works fine however enabling url rewrite in gallery (it is enabled in drupal already) causes 404's on the gallery pages.
For example I had rewrite set for albums to be http://site.address/album/albumname. The initial embedded gallery would load but clicking on the images themselves would generate 404's as it attempted to load http://www.parkingdenied.com/album/albumname which of course does not exist.
I'm not sure if this is an issue because my gallery is hosted on a subdomain but it appears like it could be. I'd like to keep the url rewrite enabled in gallery as it keeps things clean but if not i'll deal with it.
Comments
Comment #1
Claymen commentedThese are the errors I get in my apache logs.
[Sun Sep 30 07:55:24 2007] [error] [client 124.169.53.204] mod_rewrite: maximum number of internal redirects reached. Assuming configuration error. Use 'RewriteOptions MaxRedirects' to increase the limit if neccessary., referer: http://www.parkingdenied.com/index.php?q=gallery&g2_view=core.SiteAdmin&...
[Sun Sep 30 07:55:24 2007] [error] [client 124.169.53.204] Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace., referer: http://www.parkingdenied.com/index.php?q=gallery&g2_view=core.SiteAdmin&...
And here is the contents of my .htaccess for parkingdenied.com. As the embedded gallery rewrite requested I pointed it at the .htaccess for parkingdenied.com as its embedding into that. The config looks right but im not well versed in writing url rewrite configs.
# BEGIN Url Rewrite section
# (Automatically generated. Do not edit this section)
RewriteEngine On
RewriteBase /http://www.parkingdenied.com/
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d [OR]
RewriteCond %{REQUEST_FILENAME} gallery\_remote2\.php
RewriteCond %{REQUEST_URI} !/http://www.parkingdenied.com/index\.php$
RewriteRule . - [L]
RewriteCond %{THE_REQUEST} /http://www.parkingdenied.com/d/([0-9]+)-([0-9]+)/([^/?]+)(\?.|\ .)
RewriteCond %{REQUEST_URI} !/http://www.parkingdenied.com/index\.php$
RewriteRule . /main.php?g2_view=core.DownloadItem&g2_itemId=%1&g2_serialNumber=%2&g2_fileName=%3 [QSA,L]
RewriteCond %{THE_REQUEST} /http://www.parkingdenied.com/album/([^?]+)(\?.|\ .)
RewriteCond %{REQUEST_URI} !/http://www.parkingdenied.com/index\.php$
RewriteRule . //index.php?q=gallery&g2_path=%1 [QSA,L]
# END Url Rewrite section
#
# Apache/PHP/Drupal settings:
#
# Protect files and directories from prying eyes.
Order allow,deny
# Don't show directory listings for URLs which map to a directory.
Options -Indexes
# Follow symbolic links in this directory.
Options +FollowSymLinks
# Customized error messages.
ErrorDocument 404 /index.php
# Set the default handler.
DirectoryIndex index.php
# Override PHP settings. More in sites/default/settings.php
# but the following cannot be changed at runtime.
# PHP 4, Apache 1.
php_value magic_quotes_gpc 0
php_value register_globals 0
php_value session.auto_start 0
# PHP 4, Apache 2.
php_value magic_quotes_gpc 0
php_value register_globals 0
php_value session.auto_start 0
# PHP 5, Apache 1 and 2.
php_value magic_quotes_gpc 0
php_value register_globals 0
php_value session.auto_start 0
# Requires mod_expires to be enabled.
# Enable expirations.
ExpiresActive On
# Cache all files for 2 weeks after access (A).
ExpiresDefault A1209600
# Do not cache dynamically generated pages.
ExpiresByType text/html A1
# Various rewrite rules.
RewriteEngine on
# If your site can be accessed both with and without the prefix www. you
# can use one of the following settings to force user to use only one option:
#
# If you want the site to be accessed WITH the www. only, adapt and
# uncomment the following:
# RewriteCond %{HTTP_HOST} ^example\.com$ [NC]
# RewriteRule .* http://www.example.com/ [L,R=301]
#
# If you want the site to be accessed only WITHOUT the www. prefix, adapt
# and uncomment the following:
# RewriteCond %{HTTP_HOST} ^www\.example\.com$ [NC]
# RewriteRule .* http://example.com/ [L,R=301]
# Modify the RewriteBase if you are using Drupal in a subdirectory and
# the rewrite rules are not working properly.
#RewriteBase /drupal
# Rewrite old-style URLs of the form 'node.php?id=x'.
#RewriteCond %{REQUEST_FILENAME} !-f
#RewriteCond %{REQUEST_FILENAME} !-d
#RewriteCond %{QUERY_STRING} ^id=([^&]+)$
#RewriteRule node.php index.php?q=node/view/%1 [L]
# Rewrite old-style URLs of the form 'module.php?mod=x'.
#RewriteCond %{REQUEST_FILENAME} !-f
#RewriteCond %{REQUEST_FILENAME} !-d
#RewriteCond %{QUERY_STRING} ^mod=([^&]+)$
#RewriteRule module.php index.php?q=%1 [L]
# Rewrite current-style URLs of the form 'index.php?q=x'.
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
# $Id: .htaccess,v 1.81 2007/01/09 09:27:10 dries Exp $
Comment #2
profix898 commentedPlease read http://drupal.org/node/179803 for comparison. I guess you are experiencing the same problem here.
Comment #3
Claymen commentedHmm looks similair however im getting server erros when even enabling the damn thing, at least when pointing the embedded gallery at drupals .htaccess.
Comment #4
Claymen commentedThat said without enabling the embedded side of things it will 404 which makes sense as the rules arent there to tell it what to do.
Comment #5
profix898 commentedYour embedded rewrite settings are definitely wrong:
1. Your 'Show Item' rule should be 'gallery/v/%path%'
2. The rewrite base is wrong (you have set it to 'RewriteBase /http://www.parkingdenied.com/')
3. Also rewrite wont work for G2/Drupal being configured on different domains
...
Please read http://codex.gallery2.org/Integration:Drupal:Installation and try the recommended settings. If you still cant get it working, please comment back and I will try to guide you through.
Comment #6
alexandreracine commentedI hope that works for you.
DEV version not supported anymore.
------------
Feel free to reopen but please look at the latest version first! It's probably fixed.
http://drupal.org/project/gallery
Closing (cleanup)