Message Board

Newbie/Basic Questions

Older Posts ]   [ Newer Posts ]
 410 in your .htaccess
Author: A.E4   (31 Mar 09 4:37am)
How do I set for bots to see a 410 in my .htaccess file? I saw it mentioned in one of the comments on an IP I got of a spammer on my forums on my domain (domain has limited access but I do have access to the .htaccess file finally).
 
 Re: 410 in your .htaccess
Author: G.Pine   (2 Apr 09 9:19pm)
I'm no htaccess expert, but I believe this will work...

1. Create the error page, eg: 410.shtml in your root (web) directory.

2. Edit .htaccess (should be in the root dir, but also can have them in sub dirs/elsewhere). If you have any "deny from ..." lines, place this AFTER all denies:

<Files 403.shtml>
allow from all
</Files>
<Files 410.shtml>
allow from all
</Files>
..etc..

Thus you allow ALL visitors access to your error page(s)
 
 Re: 410 in your .htaccess
Author: A.E4   (3 Apr 09 3:41am)
Well I mean doesn't 410 mean the site doesn't exist? I don't want real people to think my site isn't there. Just the bots ;)
 
 Re: 410 in your .htaccess
Author: G.Pine   (3 Apr 09 6:18am)
doh I wrote a bible's worth of drivel, but I guess I timed out and it's lost to the void. This is good news for you though, because it was a lot of drivel! 3am drivel at that (sleep is for the weak).

410 error means, sorta, "Whatever you're requested was here, but is now gone, and I have no reference to it anymore" -- I think anyway. It's also an uncommon error. Mostly you'll see 400, 401, 403 and 404 errors (mostly 404's, "not found"). Then probably 403s, if you setup some bans in the .htaccess ("deny from...").

Here's a great resource about html error codes:
http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html

I did exclude a line ("order deny,allow") in the post above, to deny a specific ip (range of ips, list of ips, etc) from ALL your site's goodies do:

<Files *>
order deny,allow
# <--this is a comment tag
# Deny access to all files for IPs: 1.2.3.4, 55.66.77.88, and 9.8.765.432...
deny from 1.2.3.4 55.66.77.88 9.8.765.432
</Files>
# Allow everyone to see error pages though...
<Files 410.shtml>
allow from all
</Files>
# etc...
# it's wise to block access to .htaccess!
<Files .htaccess>
deny from all
</Files>
 
 Re: 410 in your .htaccess
Author: A.E4   (27 Apr 09 1:35am)
Thank you that is helpful. I will try that :)



do not follow this link

Privacy Policy | Terms of Use | About Project Honey Pot | FAQ | Cloudflare Site Protection | Contact Us

Copyright © 2004–25, Unspam Technologies, Inc. All rights reserved.

contact | wiki | email