[Resolved] Litespeed Status Code 444

Status
Not open for further replies.
#1
Can you tell me an alternative to this nginx bit for me to use with Litespeed?

Code:
if ($http_user_agent ~ WordPress) { return 444; }
 
Last edited by a moderator:

NiteWave

Administrator
#2
https://httpstatuses.com/444
444 CONNECTION CLOSED WITHOUT RESPONSE
A non-standard status code used to instruct nginx to close the connection without sending a response to the client, most commonly used to deny malicious or malformed requests.
This status code is not seen by the client, it only appears in nginx log files.
so it's not a standard status code and from nginx only.
fortunately, there is a similar one in litespeed:
Apache config:
RewriteCond %{HTTP_USER_AGENT} wordpress [NC]
RewriteRule .* - [E=blockbot:1]
to perform a test, we change the rewrite rule a bit to:
RewriteRule a.html - [E=blockbot:1]
Code:
#curl -Iv 127.0.0.1/a.html
* About to connect() to 127.0.0.1 port 80 (#0)
*   Trying 127.0.0.1...
* Connected to 127.0.0.1 (127.0.0.1) port 80 (#0)
> HEAD /a.html HTTP/1.1
> User-Agent: curl/7.29.0
> Host: 127.0.0.1
> Accept: */*
>
* Recv failure: Connection reset by peer
* Closing connection 0
curl: (56) Recv failure: Connection reset by peer
 
Last edited by a moderator:
Status
Not open for further replies.
Top