ZenphotoCMS Forum
.htaccess modification - Printable Version

+- ZenphotoCMS Forum (https://forum.zenphoto.org)
+-- Forum: Support (https://forum.zenphoto.org/forum-1.html)
+--- Forum: General support (https://forum.zenphoto.org/forum-4.html)
+--- Thread: .htaccess modification (/thread-579.html)



.htaccess modification - Skwid - 2006-06-10

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 !




.htaccess modification - trisweb - 2006-06-11

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.




.htaccess modification - Skwid - 2006-06-11

I did ... Nothing worked




.htaccess modification - trisweb - 2006-06-11

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).




.htaccess modification - Skwid - 2006-06-11

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