I've been a log time user to ZenPhoto and wanted to say great work Tris.
I just moved my site to a new hosting server. Now I'm having problems with mod_rewrite and ZenPhoto in only one case. Zenphoto and mod_rewrite seems to work for pretty much everything. The only time I have problems is when I'm in a gallery and I click on one of the thumbnail images to bring up the page with the bigger picture. In IE, it just hangs. In Firefox, I get a message saying "Firefox has detected that the server is redirecting the request for this address in a way that will never complete."
When I turn off mod_rewrite in the zp-config, this works without a problem. Only when mod_rewrite is enabled do I have this problem, and it's only in this instance. All my other redirects seem to work.
I'm assuming I have a problem with this rule:
RewriteRule ^([^/]+)/([^/\\]+)$ index.php?album=$1&image=$2 [L,QSA]
Can someone give me some pointers? Thanks.
Here is what is included in my htaccess file:
# htaccess file for zenphoto
# NOTE: Change the RewriteBase below to the absolute path to your zenphoto directory.
<IfModule mod_rewrite.c>
RewriteEngine On
# !!! Change this to the web path (eg:
http://www.example.com/photos --> /photos) !!!
RewriteBase /album
RewriteCond %{REQUEST_FILENAME} -f [NC,OR]
RewriteCond %{REQUEST_FILENAME} -d [NC]
RewriteRule ^.*$ - [R,L]
RewriteRule ^admin/?$ zp-files/admin.php [R,L]
RewriteRule ^page/([0-9]+)/?$ index.php?page=$1 [L,QSA]
RewriteRule ^page/([A-Za-z0-9\-_]+)/?$ index.php?p=$1 [L,QSA]
RewriteRule ^([^/]+)/?$ index.php?album=$1 [L,QSA]
RewriteRule ^([^/]+)/page/([0-9]+)/?$ index.php?album=$1&page=$2 [L,QSA]
RewriteRule ^([^/]+)/image/(thumb|[0-9]{1,4})/([^/\\]+)$ zp-files/i.php?a=$1&i=$3&s=$2 [L,QSA]
RewriteRule ^([^/]+)/image/([^/\\]+)$ albums/$1/$2 [L]
RewriteRule ^([^/]+)/([^/\\]+)$ index.php?album=$1&image=$2 [L,QSA]
</IfModule>
Comments
For the meantime, I'll try renaming my folders and see if that works. Thanks.
`My%20Folder`
as you can use & or ; in folder names
I noticed that it's not limited to spaces, but any character that gets URL encoded. So spaces, apostrophes, commas, parentheses, etc. will break the mod_rewrite. I've stripped my folders from using any "special" characters and now my albums work.
Just in case anyone else has this problem, you can try this work around.