Rewrite Rules (htaccess)

I have activated multilingual functionality of Zenphoto. My installation of Zenphoto is in the "photos" directory.

Example:
http://www.mywebsite.com/photos/ >ENGLISH
http://www.mywebsite.com/photos/fr/ >FRENCH

I am trying to rewrite my urls in the htaccess to redirect "/fr" to "/photo" (the base of zenphoto installation) and "/fr/my-album/" to "/photo/my-album/".
It works fine for the first one but not the second to redirect the album, can you help me ?

`
####
RewriteBase /photos
####
`
`
### Language
RewriteRule ^fr/?$ index.php [L]
RewriteRule ^fr/(.*)/?$ index.php?album=$1 [L]
`
Thanks by advance for your help.

Comments

  • acrylian Administrator, Developer
    It is not possible to do this because Zenphoto does not determine the selected language by url but by cookie/session. This will not work because Zenphoto internally does not generate urls like the ones you are trying to use.

    You will have to do some programming. Please search the forum for a just recent workaround to do this.
  • acrylian > what I want for now is just to load albums in the same language but with different urls...
  • acrylian Administrator, Developer
    Then I either don't understand what you are trying or it is not possible. The two examples you posted above will not work.

    `http://www.mywebsite.com/photos/ >ENGLISH`
    This is the link to the album "photos"

    `http://www.mywebsite.com/photos/fr/ >FRENCH`
    This would be the link to the subalbum "fr" of the album "photos". If you try to work on this you will probably get confusing results.

    If you want to determine the language by url you need to do some more work. See here for a start:
    http://www.zenphoto.org/support/topic.php?id=1481
Sign In or Register to comment.