Agregue la URL con ?page_id=-1
y haga una solicitud de HTTP HEAD para eso.
En los blogs de WordPress autoinstalados, esto dará como resultado una respuesta 404.
En los blogs de wordpress.com, esto resultará en una respuesta 301 (que termina en una respuesta 200 si sigues la redirección).
En sitios que no sean de WordPress, debería obtener una respuesta 200 (asumiendo que la URL original sin la cadena de consulta le dio 200) - la cadena de consulta no debe hacer ninguna diferencia.
Ejemplo con una solicitud HEAD para http://blog.stackoverflow.com/2011/03/a-new-name-for-stack-overflow-with-surprise-ending/?page_id=-1
:
HTTP/1.1 404 Not Found
Server: Apache/2.2.9 (Ubuntu) DAV/2 PHP/5.2.6-2ubuntu4.2 with Suhosin-Patch mod_ssl/2.2.9 OpenSSL/0.9.8g
Content-Encoding: gzip
Vary: Cookie,Accept-Encoding
Cache-Control: no-cache, must-revalidate, max-age=0
Last-Modified: Thu, 07 Jun 2012 08:53:01 GMT
Date: Thu, 07 Jun 2012 08:53:01 GMT
Keep-Alive: timeout=15, max=100
Expires: Wed, 11 Jan 1984 05:00:00 GMT
Pragma: no-cache
Connection: Keep-Alive
X-Powered-By: PHP/5.2.6-2ubuntu4.2
X-Pingback: http://blog.stackoverflow.com/xmlrpc.php
Content-Type: text/html; charset=UTF-8
Ejemplo con una solicitud HEAD para http://dailycrave.wordpress.com/2012/06/01/three-cheese-grilled-pizza/?page_id=-1
(siga las redirecciones desactivadas):
HTTP/1.1 301 Moved Permanently
X-Pingback: http://dailycrave.wordpress.com/xmlrpc.php
Server: nginx
Expires: Wed, 11 Jan 1984 05:00:00 GMT
X-Hacker: If you're reading this, you should visit automattic.com/jobs and apply to join the fun, mention this header.
Location: http://dailycrave.wordpress.com/2012/06/01/three-cheese-grilled-pizza/
Pragma: no-cache
Cache-Control: no-cache, must-revalidate, max-age=60
Connection: close
Last-Modified: Thu, 07 Jun 2012 09:01:09 GMT
Content-Type: text/html; charset=UTF-8
Date: Thu, 07 Jun 2012 09:01:09 GMT
(¡Observa el huevo de Pascua de X-Hacker!)
Si sigue la redirección 301 para el blog de wordpress.com, terminará con esto:
HTTP/1.1 200 OK
Server: nginx
Vary: Accept-Encoding, Cookie
Last-Modified: Thu, 07 Jun 2012 09:48:26 GMT
Cache-Control: max-age=172, must-revalidate
Connection: close
Date: Thu, 07 Jun 2012 09:50:34 GMT
Transfer-Encoding: Identity
Content-Encoding: gzip
Link: <http://wp.me/pXGqK-27g>; rel=shortlink
X-Pingback: http://dailycrave.wordpress.com/xmlrpc.php
Content-Type: text/html; charset=UTF-8
X-Nananana: Batcache
X-Hacker: If you're reading this, you should visit automattic.com/jobs and apply to join the fun, mention this header.
Tenga en cuenta el encabezado "Enlace" que contiene la URL http://wp.me/
, que parece ser común a todos los blogs alojados en wordpress.com y podría usarse para identificarlos.
Creo que esto funciona porque pasar ?page_id=-1
en la URL anula el enrutamiento predeterminado de los segmentos de URL. No habrá una página con el ID de -1, por lo que se sirve un 404 / redirect en su lugar.