ZenphotoCMS Forum
Rewrite Rules (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: Rewrite Rules (htaccess) (/thread-5858.html)



Rewrite Rules (htaccess) - NicoD - 2009-09-16

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

Quote: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.




Rewrite Rules (htaccess) - acrylian - 2009-09-17

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.




Rewrite Rules (htaccess) - NicoD - 2009-09-17

acrylian > what I want for now is just to load albums in the same language but with different urls...




Rewrite Rules (htaccess) - acrylian - 2009-09-17

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