GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   Blocking HEAD requests in apache (https://gfy.com/showthread.php?t=229718)

ZoiNk 02-01-2004 11:02 PM

Blocking HEAD requests in apache
 
Does anyone know how to block head requests and still let legit connections through. I am sure there is a way in the htaccess file, or if not, using the apache config. Anyone know? Thanks,
ZoiNk

RK 02-01-2004 11:18 PM

Why would you block HEAD requests?

Are you being attacked?

fuzebox 02-01-2004 11:20 PM

What are you trying to accomplish?

freeadultcontent 02-01-2004 11:21 PM

Never turn down head.

ZoiNk 02-01-2004 11:30 PM

A friend of mine was asking, so I thought I would try and find the answer for him.

Attackers try bruteforcing htaccess password protection, and it shows up as a HEAD request, not a get request. for the password protected area, i want to allow only GET requests. there is multiple attempts by dozens of ip addresses at the same time, so it is hard/not practical to block them or redirect stuff. the attacks come and go, but it would be easier on server resources if would just deny HEAD requests for that directory and not bother to authenicate.

ZoiNk

ZoiNk 02-01-2004 11:31 PM

Quote:

Originally posted by freeadultcontent
Never turn down head.
.... Except when it comes from a guy offering....

ZoiNk

RK 02-01-2004 11:50 PM

So I was right.
Use something like this, this is not PHP but the only way the board will let me post it:

PHP Code:

<Limit GET POST>
  ...
  
access restriction directives such as require or deny
  
...
</
Limit


nuclei 02-02-2004 12:08 AM

drop this in a .htaccess in the directory you want to deny HEAD requests from. Then test to make sure it doesnt deny get/post. It shouldn't tho.


&lt;Limit HEAD&gt;
order deny,allow
deny from all
&lt;/Limit&gt;

CGI 02-02-2004 12:25 AM

&lt;LimitExcept GET POST&gt;
order deny,allow
deny from all
&lt;/LimitExcept&gt;


All times are GMT -7. The time now is 09:28 AM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123