Welcome to WebmasterWorld Guest from 23.23.46.20

Forum Moderators: Ocean10000 & incrediBILL & phranque

.Simple htaccess file question ....

.Simple htaccess file question ....

   
7:50 pm on Jul 10, 2003 (gmt 0)

10+ Year Member



i got probally a simple .htaccess file question ....

i got a folder stractor like this:

www/themplates/pdf/

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)

WebmasterWorld Senior Member 10+ Year Member



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)

10+ Year Member



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)

WebmasterWorld Senior Member 10+ Year Member



StopSpam,

- 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 ../

/claus

 

Featured Threads

My Threads

Hot Threads This Week

Hot Threads This Month