Closed (fixed)
Project:
Gallery
Version:
5.x-2.2
Component:
Installation / Configuration
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
31 Mar 2008 at 03:45 UTC
Updated:
24 Mar 2009 at 03:12 UTC
Hi,
Even if I had enabled "clean url" in Drupal settings, when I click an album or image my url shows as http://chandrabhan.com/dp/index.php?q=gallery&g2_itemId=72
Comments
Comment #1
profix898 commentedClean URLs in Drupal and URL Rewrite in Gallery2 are to separate things. You must enable both options to get clean urls with this module.
Comment #2
luco commentedsame here.I DID enable clean URLs in both Drupal 5.7 and G2, but to no avail. plus all info on the subject is either imprecise, ineffective, or both.
what I have discovered is: if you turn off G2's clean URLs, you can navigate albums in embedded mode - but from a SEO point of view that's not useful.
what's more, G2's official website DOES have clean URLs. and it does look as though Drupal is their CMS of choice. so how come?
don't take me wrong: I'd love to chip in for G2's improvement, but I can't afford to use a buggy tool on my customers' websites.
Comment #3
skalfyfan commentedI have the same exact issue as the original poster. Both options are enabled. In Gallery2 I am using the PHP Path Info while in Drupal I am using Apache mod_rewrite.
Do both need to be using mod_rewrite?
Comment #4
light-blue commentedI can't figure this out either. I have done this:
http://codex.gallery2.org/Integration:Drupal:Installation
===================================
Make sure you have the "Image Block" plugin (Gallery2:Modules:imageblock) installed and enabled in G2 before proceeding with the embedded setup. You should also configure "URL Rewrite" in your standalone Gallery2 and set the "Rules" to
Show Item: "gallery/v/%path%"
Please read the URL Rewrite tutorial for more information.
If you plan to create a multilingual site (e.g. using the i18n module in Drupal), do NOT prefix the paths with "%language%".
Comment #5
light-blue commentedThis is mildly helpful too...
http://gallery.menalto.com/node/46181
============================
The second reason nothing was working for me was that I misinterpreted the embedded URL rewrite help. It states "For URL Rewrite to work in an embedded environment you need to set up an extra htaccess file to hold the mod_rewrite rules." which I took to mean that the location of this extra .htaccess file was not that important. Since I didn't want it overwriting my drupal .htaccess file I put it somewhere else. It was only after checking http://codex.gallery2.org/index.php/Gallery2:Modules:rewrite I see that the extra .htaccess file really has to be the same as the drupal one. Can the help please be updated sometime to clarify this.
Thanks -- it's good to finally have this working well.
Comment #6
profix898 commented1. URLRewrite requires mod_rewrite being used in Drupal AND G2. mod_rewrite for Drupal and PHP PathInfo for G2 wont work.
2. http://codex.gallery2.org/Integration:Drupal:Installation:URL_Rewrite (which is linked from http://codex.gallery2.org/Integration:Drupal:Installation) is not perfect, but it already states that .htaccess file specified for rewrite in embedded G2 must be Drupal's .htaccess.
@light-blue: Any suggestions for improving the rewrite documentation? Feel free to contribute and edit the codex wiki ;)
Comment #7
alexandreracine commentedReopen if needed. Cleaning up old stuff.