Pingback mechanism using mod_rewrite

Simon Willison proposed a pingback mechanism without using xml-rpc:

My solution is an extension of my own Pingback implementation. Whenever I link to a site from my blog, a script running on my server requests each of the pages I have linked to and checks for information on a related Pingback server[..].

In a comment to that entry, Ian Hickson [2] played with the idea of using Apache\’s URL Rewriting module; while Mark Pilgrim came up with a concrete proposal, like:

RewriteEngine on
RewriteCond %{HTTP_USER_AGENT} pingback-probe
RewriteRule (.*) http://example.com/deal-with-pingback.php?uri=$1 [T=application/x-httpd-php,L]

[1] http://simon.incutio.com/archive/2003/02/24/pingbackRedux
[2] http://www.hixie.ch/specs/pingback/pingback
[3] http://diveintomark.org

Leave a Reply