| Welcome to WebmasterWorld Guest from 22.214.171.124 |
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
|Become a Pro Member|
|.Simple htaccess file question ....|
.Simple htaccess file question ....
i got probally a simple .htaccess file question ....
i got a folder stractor like this:
the folder ‘themplates’ is password protected.
now i have a htaccess file in the folder ,www,
that says : ErrorDocument 401 /cgi-bin/count.cgi
so all failed logins are counted
now i want a failed login directly to folder ‘pdf’
npot to be counted ...
how can i turn of the ErrorDocument 401 /cgi-bin/count.cgi
for the folder /pdf/
so it only counts failed login to folder/themplates/
the folder themplates is password protected
if i place a eampthy htaccess file int he /pdf/ folder will it thennot run 401 count.cgi if some one fails tologin directly to /pdf/ folder?
As I understand it, .htaccess files operate on a context basis, in other words, on the content of the directory in which they reside, and all subdirectories.
Adding an .htaccess to your www/themplates/pdf/ directory that contains ErrorDocument 404 PDFError.html should stop counting failed logins in this directory.
i tryed this;
ErrorDocument 404 [ww.My_Main_page.com...]
and added it to the folder pdf...
but it still runs the 401 line from the www folder.
- please check this: did you write 404 or was it 401?
If you are redirecting a 404 but there is no error handler for the 401, then the 401 will be caught by the .htaccess file "upstream", ie. in your root.
Plus, the http:// stuff ... i'm not sure it will work, try this in stead to use your front page as error handler for 404s:
ErrorDocument 404 ../
All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved