[wp-hackers] OpenSearch RSS Autodiscovery for Searches - Kinda

Christopher J. Hradil chradil at comcast.net
Mon May 22 04:02:01 GMT 2006


 
Looks like your server is running Apache 2.x.x, there could be some issues
there. Does the server have mod_frontpage or the frontpage extensions
installed. If it does, that's your problem. Any changes you make to
.htaccess if FP is there will wreak havoc. There's a pretty easy fix if
that's it though. 



/**************************************
Christopher J. Hradil
chradil at comcast.net
http://www.hradil.us
**************************************/


-----Original Message-----
From: wp-hackers-bounces at lists.automattic.com
[mailto:wp-hackers-bounces at lists.automattic.com] On Behalf Of Chris Pirillo
Sent: Sunday, May 21, 2006 11:52 PM
To: wp-hackers at lists.automattic.com
Subject: [wp-hackers] OpenSearch RSS Autodiscovery for Searches - Kinda

Hackers,

I just got OpenSearch configured. Kinda. It's not really working the way it
should yet.

This works:
 http://chris.pirillo.com/wp-content/plugins/opensearch/description.php

This works:
 http://chris.pirillo.com/wp-content/plugins/opensearch/opensearch.php?s=boo

This doesn't, and it should (according to .htaccess, TMK):
 http://chris.pirillo.com/os-query?s=book

One new line in the .htaccess (single line):
RewriteRule ^os-query?(.*)$
/opt/sp/pirillo.com/chris.pirillo.com/wp-content/plugins/opensearch/opensear
ch.php?$1 [QSA,L]

I'm not sure what I messed up, as the file is definitely in that location on
my server (per the working hyperlink above). The shorter URL should work,
and when combined with a real search, you'll see AutoDiscovery enabled:
 http://chris.pirillo.com/index.php?s=bingo

And for that, you'll need this code in your header.php template:

<?php if (is_search()) { ?>
<link rel="alternate" type="application/rss+xml" title="<?php
bloginfo('name'); ?>: <?php echo wp_specialchars($s); ?>"
href="http://chris.pirillo.com/os-query?s=<?php echo wp_specialchars($s);
?>" /> <?php } ?>

Thanks to these two folks for getting the ball rolling:

 http://www.williamsburger.com/wb/archives/opensearch-v-1-0/

 http://www.robinsonhouse.com/2005/12/31/wp-opensearch-10-fix-for-wp-20/

Chris

_______________________________________________
wp-hackers mailing list
wp-hackers at lists.automattic.com
http://lists.automattic.com/mailman/listinfo/wp-hackers



More information about the wp-hackers mailing list