| Welcome to WebmasterWorld Guest from 188.8.131.52 |
register, login, search, subscribe, help, library, PubCon, announcements, recent posts, open posts,
|Subscribe and Support WebmasterWorld|
|.Simple htaccess file question ....|
.Simple htaccess file question ....
| 7:50 pm on Jul 10, 2003 (gmt 0)|
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?
| 4:11 pm on Jul 11, 2003 (gmt 0)|
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.
| 4:22 pm on Jul 11, 2003 (gmt 0)|
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.
| 4:31 pm on Jul 11, 2003 (gmt 0)|
- 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 ® and PubCon ® are a Registered Trademarks of Pubcon Inc.
© Pubcon Inc. 1996-2012 all rights reserved