I have zenphoto installed in my main directory (/) with mod_rewrite enabled and everything works fine.
Now I'm trying to run a completely unrelated script in my cgi_bin directory (/cgi-bin) I tried editing the htaccess file so that all requests to localhost/p are directed to the cgi-bin directory but all I get is an object notfound error with the following text ...
I placed a simple gif in the cgi-bin and I try to request it by localhost/p/model.gif
`
The Zenphoto object you are requesting cannot be found.
Album: p
Image: model.gif
Page: index
`
I know basics of htaccess and this my current htaccess I added the bolded line ...
`
# htaccess file version 1.2.2.0;
# Update the above and the define in setup.php when you make changes to the rewrite rules!
# NOTE: Change the RewriteBase below to the absolute path to your zenphoto directory. (Or let setup.php do it for you!)
RewriteEngine On
#### !!! Change this to the web path (eg:
http://www.yourwebsite.com/photos --> /photos) !!!
RewriteBase /
####
RewriteRule ^admin/?$ zp-core/admin.php [R,L]
RewriteRule ^p/(.+)$ cgi-bin/$1 [L] ##########
`
I read the mod_rewrite documentation and it seems to say that the L flag should stop all other processing so I'm not sure why it keeps processing after it matches the /p pattern. Any help would be appreciated, thanks.
Comments
`
The Zenphoto object you are requesting cannot be found.
Album: cgi-bin
Image: model.gif
Page: index
`
The standard zenphoto .htaccess file will check to see if the page referneced by the URI is an existing file. If so it will just load that file. If the file is not found you will get the zenphoto 404 error.
So the indication you are getting is that the .htaccess processing cannot find the target file.
Any ideas as to what is happening in the cgi-bin that is causing this?
Another thing I noticed is that it actually runs the file if it is a .pl (through log file) but it still displays the zp Object not found page.