Someone in Facebook posted a link to my site. Facebook tries to show a preview of the page with the link but it only shows "403 Forbidden". I am sure that I am somewhere blocking this Facebook request but am not sure what the issue is. For example, I only accept GET
POST
and HEAD
requests and perhaps this is some other kind of request.
The link looks like this (with the site name changed).
<a class="_52c6" href="https://www.example.com/index.php?topid=1&grade=4&page=Movement" tabindex="-1" target="_blank" data-lynx-mode="async" rel="nofollow" data-lynx-uri="https://l.facebook.com/l.php?u=https%3A%2F%2Fwww.example.com%2Findex.php%3Ftopid%3D1%26grade%3D4%26page%3DMovement&h=ATMXgEds4Ymh3lFXLPXBbWVCIpDtJE_0gYVzgWTVdbsPfrBr6vIr7CJhYxkxDpQpB-js2Yl91RpOiRU5q8XFbZyvtVspSVZ6WG7tIB6rQkV2-nP8iIskWlN5Tha441w7nfGx9aaby2TmQdT9QMNt0IpGsXttslzB6GXaX7fnbgWJyHfCyJN-BdTKtO9V-gXtJc6IFiRqcSsa57JSXgNDTRq50D-dkMIl4YLFaUYN4xL8ozIOZMakcDxjgksMUx9G"></a>
Each time I load the Facebook page, I would expect to get a request in my server log that I am blocking, but I don't see any. Can you help me pinpoint what is going on here?
facebookexternalhit/1.1 (+http://www.facebook.com/externalhit_uatext.php)
php
but if a certain threshold of hits is reached from a "bad bot" user agent, then that user agent is automatically added to aRewriteCond
in.htaccess.
Because it was added to.htaccess
, my error log of blocked requests (generated in php) didn't contain a trace of it. It is good to know my.htaccess
blocking is working.