Member
Member
Skwid   2006-06-10, 18:53
#1

Hi,
I am doing a theme with integrated slideshow, and I wanted to add a rule so that http://site.com/albumName/Slideshow redirects to the slideshow.

RewriteRule ^([^/]+)/slideshow/?$ index.php?album=$1&view=slideshow [R]

It works but only when I use the R parameter, but then I lose my nice URL ...
With any other parameter zenphoto gives me an error, apparently it looks for a photo named slideshow in the album, even though it should not.

I tested the rules on a phpinfo instead of zp's index.php, and they worked perfectly.

I don't know what's going on !

Developer
Developer
trisweb   2006-06-11, 09:22
#2

Try messing with the ordering of the rules, and also put an [L] in the line settings to make it the last and not continue rewriting.

Member
Member
Skwid   2006-06-11, 15:18
#3

I did ... Nothing worked

Developer
Developer
trisweb   2006-06-11, 17:12
#4

It should work as long as it's before the image rewriting part and has that [L]... I don't see why it wouldn't. Try adding [L,QSA] (not that it should make a difference).

Oh! I know what it is! The code in template-functions.php(:39-52) that re-does the rewrite parse because of a bug in mod_rewrite (we really have to move the whole thing internal, that was just a hack for 1.0.3). You'll have to add another condition for the slideshow as well... change line 47 to this:

if (isset($zpitems[1]) && $zpitems[1] != 'slideshow')

You're just replacing 'page' with 'slideshow' there. I just realized the page check is done elsewhere redundantly.

Sorry for the confusion, I forgot that mod_rewrite isn't the only thing controlling the paths anymore (because it's so buggy with non-ASCII encoded characters... blech).

Member
Member
Skwid   2006-06-11, 23:46
#5

YES !!!!
It finally works !
Wow... thanks for the tip ! I spent about 3 hours trying to figure this out the other day with the help of #apache on freenode ...
It feels good that it's finally working

http://pics.lostocean.net/01/slideshow

  
Powered By MyBB, © 2002-2026 MyBB Group.
Made with by Curves UI.