Many thanks to Rick Moynihan who pointed out that the rss feeds on this site didn’t work.
It was puzzling because on another site with an almost identical setup they did. I still haven’t figured out the underlying cause. For some reason the file wp-rss2.php was not being served up by the webserver when rss or rss2 requests were made.
I spent the better part of an afternoon digging around the Wordpress php code.
First I thought
“/home/geeklawy/public_html/[blah]/wp-content/themes/default/ footer.php“
held the clue.
I replaced the line
“ xhref=”feed:< ?php bloginfo(’rss2_url’); ?>”>Entries (RSS)“
with a hardcoded reference
“ xhref=”feed:http://geeklawyer.org/blog/ws-rss2.php”>Entries (RSS)“.
Nothing.
So then I guessed if the server wasn’t seeing it, it was a mod-rewrite problem in the ‘.htaccess’ file. I hate mod-rewrite because it never gives up its virtue without a struggle, even though I’m reasonably competent with regular expressions. Nonetheless I replaced
“RewriteRule ^feed/(feed|rdf|rss|rss2|atom)/?$ /index.php?&feed=$1 [QSA,L] “
with
“RewriteRule ^(feed|rdf|rss|rss2|atom)/?$ /ws-$1.php [QSA,L]“
Nothing, nada, zip.
Then I discovered that entirely removing any reference to rss2 from the footer of the working page still didn’t prevent a feed being found!! Wierd - now we has a scary psychic page that just knew how to do the right thing. Why doesn’t software do that more often?
On examining the page source I noticed that the headers refer to rss2 also, though I figured this was just some stylesheet foo but I wasn’t sure. Removing it from the working page finally killed it, while adding it to dead page made it work. Bingo!
I still don’t know why it doesn’t work but I can hack round it - the virtue of Opensource software. I have now hardcoded the rss2 feed file into the
“/home/geeklawy/public_html/blog/ wp-content/themes/default/header.php“
file
which now reads:
“ link rel=”alternate” type=”application/rss+xml” title=”RSS 2.0″ xhref=”http://geeklawyer.org/blog/wp-rss2.php” “
So now you can subscribe - I hope. And God how I hate php.
No comments yet.