homepage Welcome to WebmasterWorld Guest from 54.166.53.169
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / Apache Web Server
Forum Library, Charter, Moderators: Ocean10000 & incrediBILL & phranque

Apache Web Server Forum

    
.Simple htaccess file question ....
.Simple htaccess file question ....
StopSpam

10+ Year Member



 
Msg#: 288 posted 7:50 pm on Jul 10, 2003 (gmt 0)

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?

 

DaveAtIFG

WebmasterWorld Senior Member 10+ Year Member



 
Msg#: 288 posted 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.

StopSpam

10+ Year Member



 
Msg#: 288 posted 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.

claus

WebmasterWorld Senior Member 10+ Year Member



 
Msg#: 288 posted 4:31 pm on Jul 11, 2003 (gmt 0)

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

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / Apache Web Server
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved