Good stuff for programming geeks
[ start | index | login or register ]
start > 2004-03-30 > 1

Start/2004-03-30/1

Created by tmoertel. Last edited by tmoertel 1591 days ago. Viewed 3911 times. #1
[edit] [rdf]
labels
attachments

Quick fixes for RSS-feed problems in SnipSnap 0.5.1a

Upgrading to SnipSnap 0.5.1a has gone smoothly with a few exceptions. One such exception is RSS feeds.

As they are, SS 0.5.1a's RSS feeds are broken in (at least) two ways. First, the HTML that SnipSnap generates advertises the associated RSS feed as being at base/ss/exec/rss, but visiting that URL causes a 500 Internal Error because there is no snip=snip in the associated QUERY_STRING. Second, the RSS that is generated contains relative URLs, but they are broken w.r.t. the link elements in the RSS item elements, which many news aggregators use as the HTML BASE when displaying encoded feed items. As a result, images don't load, and links don't work.

The fix, as usual, is to add a few Apache RewriteRules:

# The following workarounds are for SnipSnap 0.5.1a's broken RSS feeds

RewriteCond %{QUERY_STRING} !snip= RewriteRule ^/ss/exec/rss$ /ss/exec/rss?snip=start [L,R]

RewriteRule ^/ss/space/theme/(.*) /ss/theme/$1 [L,R] RewriteRule ^/ss/space/space/(.*) /ss/space/$1 [L,R]

no comments | post comment
community.moertel.com | Copyright © 2003–07 Moertel Consulting