mod_rewrite driving me mad

Hello,

i have a mod_rewrite problem that's driving me mad.

I want to translate URL's like this :

index.php?sid=11&album=habitats-prives/projet-006
into --> (webroot)/sid/11/habitats-prives/projet-006

"When mod_rewrite's on, my URL's are translated interally in php:
sid=11&album=habitats-prives/projet-006
becomes --> /sid/11/habitats-prives/projet-006

But zenphoto doesn't recognize (webroot)/sid/11/habitats-prives/projet-006

I've added this to .htaccess :
RewriteRule ^sid/([0-9]+)/(.*)/?$ index.php?sid=$1&album=$2 [R,L]

It works, but then off course it redirects to the ugly URL.

When I change [R,L] into [L,QSA] I get this error message :
Zenphoto Error: the requested object was not found. Please go back and try again".

Do I have to add some stuff in template_functions.php? Which lines do i need to modify ??

Comments

  • trisweb Administrator
    Zenphoto uses internal PHP rewriting in functions-controller.php to get the album and image names, as mod_rewrite itself is very buggy and unreliable. Also, it's the only way to make sub-albums work correctly.

    Why are you trying to add the "sid" variable? What is it needed for?
Sign In or Register to comment.