ZenphotoCMS Forum
Need help with htaccess - 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: Need help with htaccess (/thread-1607.html)



Need help with htaccess - acrylian - 2007-09-07

Now I need a little help, too. I am currently making a website with zenphoto (what else?) for a customer and I use it a bit differently than normal (I'll post the URL when ready), so that the included htaccess file doesn't fit completly. I just don't get these ReWrite Rules...

These /index.php?p=uebersicht&rubrik=gr&page=1 I want to look like this
/uebersicht/gr/1

Would be nice if someone could tell me what rule to add.
Thanks.




Need help with htaccess - sbillard - 2007-09-07

Is this to go along with zenphoto? If so, I think you have a problem. /ubersicht/gr/1 would be indistinguishable from an album reference &album=ubersicht/gr&page=1
Would ubersicht be constant? If so,
RewriteRule ^/ubersicht/(.*)/([0-9]+)/?$ index.php?ubersicht&p=$1&page=$2 [L,QSA]
will work. [caveat, I have not tried this.]




Need help with htaccess - acrylian - 2007-09-07

sbillard. thanks for replying, but that doesn't work. "uebersicht" is not an album. I think I should explain further: This is a very modified zenphoto install (the text pages are administrated by website baker). It uses not the normal index/album/image.php-order. In fact I skipp album.php and use an additional modified index.php named uebersicht.php ("uebersicht" means overview and "rubrik" means category in german). This is called by the zp standard term for pages "p=uebersicht". It doesn't use any subalbums and I had to write a new function for that, but zenphoto is really cool, it works! The best would be you take a look to see what I mean.
The site already for testing online: www.renateemme.de (look under the link "Bilder für große Leute" (means "images for grown people"), there are a few unrelated test images)

It works without mod_rewrite perfectly, but would be nicer with of course...




Need help with htaccess - sbillard - 2007-09-07

So, no zenfolder album stuff would be involved? Then the rule would be:

RewriteRule ^/(.*)/(.*)/([0-9])+)/?$ index.php?p=$1&rubrik=$2&page=$3




Need help with htaccess - acrylian - 2007-09-08

Thanks for trying but that doesn't rewrite the link either. Actually it places the name of the album before all links now if you were on an image page (and in an album) and go back to other pages right (e.g. gr-muetter/index.php?p=uebersicht&rubrik=gr&page=1). Any other idea maybe?




Need help with htaccess - sbillard - 2007-09-08

Here is the full discourse on mod_rewrite http://httpd.apache.org/docs/1.3/mod/mod_rewrite.html




Need help with htaccess - acrylian - 2007-09-09

Thanks again, I think I really need to dig into this.