![]() |
|
Mod_rewrite not letting me use other directories - 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: Mod_rewrite not letting me use other directories (/thread-4338.html) |
Mod_rewrite not letting me use other directories - emil2k - 2008-12-29 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
` 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] ########## Mod_rewrite not letting me use other directories - acrylian - 2008-12-29 Why don't you link directly? That should work, too. Mod_rewrite not letting me use other directories - emil2k - 2008-12-29 Same error happens when I try to go directly except the error is ... ` The Zenphoto object you are requesting cannot be found. Album: cgi-bin Image: model.gif Page: index ` Mod_rewrite not letting me use other directories - sbillard - 2008-12-29 You should not need to do anything to run a script in some other folder. (That is exactly how the admin backend runs.) 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. Mod_rewrite not letting me use other directories - emil2k - 2008-12-29 Thats the weird thing its only the cgi-bin folder, I put another folder named c with the same model.gif file and I was able to access it. Any ideas as to what is happening in the cgi-bin that is causing this? Mod_rewrite not letting me use other directories - sbillard - 2008-12-29 Probably access security on that file. It is not normal to directly link to scripts in the cgi-bin folder. Normally other scripts load resources from there. Mod_rewrite not letting me use other directories - emil2k - 2008-12-30 Should I change the permissions or something they are already on 755? What can I do? 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. Mod_rewrite not letting me use other directories - emil2k - 2008-12-30 I fixed this, for other who may have this problem ... try changing the .pl to .cgi ... |