![]() |
|
Issue with the .htaccess catch-all rule and password protected directory - 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: Issue with the .htaccess catch-all rule and password protected directory (/thread-11015.html) |
Issue with the .htaccess catch-all rule and password protected directory - curlypinky - 2013-04-26 I have a folder called "admin" that is password protected using cpanel's .htaccess rules. "The Zenphoto object you are requesting cannot be found. This seems to affect any folder with htaccess password protection. I have isolated the problem to ZenPhoto's htaccess catch-all rule: Catch-all - everything else gets handled in PHP for compatibility.RewriteRule ^(.*)/?$ index.php?album=$1 [L,QSA] ` It seems that this is an issue with .htaccess password protected directories. The solution I found that worked was to add the following to the htaccess: ErrorDocument 401 /myerror.html And create a static page for myerror.html Issue with the .htaccess catch-all rule and password protected directory - sbillard - 2013-04-26 I presume that this is caused by the way that the .htaccess password protection works. Presumably it does not let the rewrite rules know that the folder is a folder, so the rules that detect real folders fail and the url is presumed to be a request for an album. Your workaround or something like it that detects these folders and handles them ahead of any zenphoto rules processing is the proper solution. |