Hi,
I'm installing zenphoto behind an apache reverse proxy (
http://www.mysite.com/photos/ ->
http://internalzphoto/).
After tweaking the following settings I got it working.
define('WEBPATH', '/photos');
$_SERVER['HTTP_HOST']='www.mysite.com';
Now I am trying to use mod_rewrite for nicer URLs using the stock .htaccess with RewriteBase / (any other value gives an HTTP error 500 as the web server gets into an infinite loop).
However the rewrites are failing in a strange way :
http://www.mysite.com/photos/01234567890123456789/ gives :
The Zenphoto object you are requesting cannot be found.
Album: 7890123456789
Somehow the album name gets truncated.
Whereas
http://www.mysite.com/photos/123456/ works and display the album as expected. However then accessing an image within that album fails :
http://www.mysite.com/photos/123456/IMG_4233.JPG.php gives:
The Zenphoto object you are requesting cannot be found.
Album: 123456/IMG_4233.JPG.php
I have enabled mod_rewrite debugging but must admit being rather clueless about what to make out of the logs or what to try now. Help would be much appreciated.
Comments
given the information above the rewrite base should be `/photos`.
Do note that it is not possible to use mod_rewrite if there is more than one URI pointing to your installation. Rewrite rules allow for only one base.
My "internal" zenphoto was at http://zenphoto/ I changed it to be http://zenphoto/photos/ , set RewriteBase to /photos and it now works perfectly.
Let me know if you are interested in a more detailed writeup of how to run zenphoto behind a reverse proxy.