[SOLVED] URL Rewrite Error

doomdead

Joined: 2003-04-06
Posts: 174
Posted: Tue, 2006-03-07 19:04

I have Gallery 2.1 rc1 on IIS6

When I enable url rewrite it appears to function correctly, except for the breadcrumb.
I get a url simliar to this, http://www.robplatt.com/v/Friends/?g2_highlightId=8633 ,and it says cannot find file. but if i remove the end so its just, http://www.robplatt.com/v/Friends/, it works fine.

any ideas on how to make this work so i can keep it enabled?

thanks.

 
pelle
pelle's picture

Joined: 2004-12-10
Posts: 389
Posted: Wed, 2006-03-08 12:49

Can you please post the Gallery section of your httpd.ini file? Thanks.

 
doomdead

Joined: 2003-04-06
Posts: 174
Posted: Wed, 2006-03-08 16:22

# BEGIN Gallery 2 Url Rewrite section (GalleryID: D:\Inetpub\wwwroot\gallery2)
# Do not edit this section manually. Gallery will overwrite it automatically.

RewriteCond Host: www\.robplatt\.com
RewriteRule /modules/rewrite/data/isapi_rewrite/Rewrite.txt /modules/rewrite/data/isapi_rewrite/Works.txt [O]

RewriteCond Host: www\.robplatt\.com
RewriteRule /c/view/([0-9]+).html /main.php?g2_view=comment.ShowAllComments&g2_itemId=$1 [N]
RewriteCond Host: www\.robplatt\.com
RewriteRule /c/view/([0-9]+).html\?(.*) /main.php?g2_view=comment.ShowAllComments&g2_itemId=$1&$2 [N]

RewriteCond Host: www\.robplatt\.com
RewriteRule /c/add/([0-9]+).html /main.php?g2_view=comment.AddComment&g2_itemId=$1 [N]
RewriteCond Host: www\.robplatt\.com
RewriteRule /c/add/([0-9]+).html\?(.*) /main.php?g2_view=comment.AddComment&g2_itemId=$1&$2 [N]

RewriteCond Host: www\.robplatt\.com
RewriteRule /d/([0-9]+)-([0-9]+)/([^\/\?]+) /main.php?g2_view=core.DownloadItem&g2_itemId=$1&g2_serialNumber=$2&g2_fileName=$3 [N]
RewriteCond Host: www\.robplatt\.com
RewriteRule /d/([0-9]+)-([0-9]+)/([^\/\?]+)\?(.*) /main.php?g2_view=core.DownloadItem&g2_itemId=$1&g2_serialNumber=$2&g2_fileName=$3&$4 [N]

RewriteCond Host: www\.robplatt\.com
RewriteRule /v/([^?]+) /main.php?g2_view=core.ShowItem&g2_path=$1 [N]
RewriteCond Host: www\.robplatt\.com
RewriteRule /v/([^?]+)\?(.*) /main.php?g2_view=core.ShowItem&g2_path=$1&$2 [N]

# END Url Rewrite section

 
pelle
pelle's picture

Joined: 2004-12-10
Posts: 389
Posted: Thu, 2006-03-09 14:06

What happens if you in the last rule remove the escape of '?', like this:

RewriteRule /v/([^?]+)?(.*) /main.php?g2_view=core.ShowItem&g2_path=$1&$2 [N]

 
doomdead

Joined: 2003-04-06
Posts: 174
Posted: Thu, 2006-03-09 16:07

That worked, thanks pelle. So what does this mean? Bug in gallery, bug in the iis urlrewrite plugin? and will i have to fix this everytime i change the urlrewrite options (not that i should need to make many changes)...

 
pelle
pelle's picture

Joined: 2004-12-10
Posts: 389
Posted: Fri, 2006-03-10 11:53

Great, it means that it's a bug in Gallery. The fix should be in the next nightly.

 
kaksi

Joined: 2005-09-16
Posts: 32
Posted: Tue, 2006-10-03 07:04

Hi!

What module are you using for IIS to enable rewrite? Is it some kind of isapi filter? Does it work out of the box with gallery2?

 
pelle
pelle's picture

Joined: 2004-12-10
Posts: 389
Posted: Sat, 2006-10-07 10:15

The URL Rewrite module has ISAPI Rewrite support. If you have ISAPI Rewrite proberly setup on your host it'll most likely work out fo the box with Gallery2.