G2 embedded in Drupal - G2 Clean URLs fail to work properly.
dbmathis
Joined: 2003-12-10
Posts: 52 |
Posted: Tue, 2006-06-06 20:45 |
Hi all, I am using G2 embedded into Drupal and I am not able to get 'Clean URLs' to work for gallery2 while gallery2 is embedded in Drupal. Clean URLs work fine for Gallery2 while gallery2 is in standalone mode. Clean URLs work fine for Drupal while Drupal is standalone and while gallery2 is embedded in Drupal. Gallery2 Clean URLs break when it is embedded. I have spent the last 3 days trying to figure this out and I am at a deadend. When gallery2 is embedded, the embedded gallery root is displayed, and when my mouse hovers over the albums it appears to display the correct Clean URLs. When I click on the gallery block photo or an album I am just brought to the main/root embedded gallery page. Does anyone know why this might be happening?
# BEGIN Url Rewrite section # (Automatically generated. Do not edit this section) <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} -f [OR] RewriteCond %{REQUEST_FILENAME} -d [OR] RewriteCond %{REQUEST_FILENAME} gallery\_remote2\.php RewriteCond %{REQUEST_FILENAME} !/index\.php$ RewriteRule . - [L] RewriteCond %{THE_REQUEST} \ /gallery/([^?]+)(\?.|\ .) RewriteCond %{REQUEST_FILENAME} !/index\.php$ RewriteRule . /index.php?q=gallery&g2_view=core.ShowItem&g2_path=%1 [QSA,L] </IfModule> # END Url Rewrite section # # Apache/PHP/Drupal settings: # # Protect files and directories from prying eyes. <FilesMatch "(\.(engine|inc|install|module|sh|.*sql|theme|tpl(\.php)?|xtmpl)|code-style\.pl|Entries.*|Repository|Root)$"> Order deny,allow Deny from all </FilesMatch> # Set some options. Options -Indexes 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 <IfModule mod_php4.c> php_value magic_quotes_gpc 0 php_value register_globals 0 php_value session.auto_start 0 </IfModule> # PHP 4, Apache 2 <IfModule sapi_apache2.c> php_value magic_quotes_gpc 0 php_value register_globals 0 php_value session.auto_start 0 </IfModule> # PHP 5, Apache 1 and 2 <IfModule mod_php5.c> php_value magic_quotes_gpc 0 php_value register_globals 0 php_value session.auto_start 0 </IfModule> # Reduce the time dynamically generated pages are cache-able. <IfModule mod_expires.c> ExpiresByType text/html A1 </IfModule> # Various rewrite rules. <IfModule mod_rewrite.c> 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} !^www\.example\.com$ [NC] # RewriteRule .* http://www.example.com/ [L,R=301] # # If you want the site to be accessed only WITHOUT the www. , adapt and uncomment the following: # RewriteCond %{HTTP_HOST} !^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] </IfModule> # $Id: .htaccess,v 1.73 2006/04/14 09:08:26 killes Exp $
Standalone Gallery with clean URLs: Drupal with clean URLs: Embedded Gallery rules: Embedded Gallery setup: Embedded Gallery test: Embedded Gallery hover: Drupal -> Settings -> Gallery (ERROR):
http://gallery.menalto.com/node/38019
|
|
Posts: 189
I think I can see why the gallery.module autoconfig failed. There is a search/replace of the gallery.module dir that is not happening here so the directory is wrong -- this is likely caused by the '\' instead of '/' path separator. I'll look at it.
However, your .htaccess file does look right to me (quite similar to mine). I do not know why it does not work. With the 4.7 version of gallery.module you can set rules for all items (except admin) so I suggest trying one of the others (comments, download etc) and seeing what happens.
Posts: 52
I enabled the comments and download and still no luck.
Posts: 52
So nobody knows why this is happening?