Hacker News new | past | comments | ask | show | jobs | submit login

I had a project were in case of a 400 errors 418 error would be used.



Me too, kind of.

I have nginx reply with a 418 page to bad bots requests. Funny easter egg. As a bonus, that makes nginx avoid checking the filesystem for inexistent files, and makes filtering logs easier.

Nginx config snippet:

  # Nothing to hack around here, I’m just a teapot:
  location ~* \.(?:php|aspx?|jsp|dll|sql|bak)$ { 
      return 418; 
  }
  error_page 418 /418.html;
Example: https://FreeSolitaire.win/wp-login.php


Nice. I used to use that for all php requests to my websites (like you, I do not have php installed on my servers). Now I just use the nginx 444, which immediately drops the connection.

I wonder if it actually saves much time. Probably not.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: