Page 1 of 1

MimeType for RSS

Posted: Tue May 16, 2006 11:16 am
by gibtsNicht
I have difficulties with my RSS-Feed. It works just fine, the validators like it and some RSS-Clients i tried have no difficulties, too.

But... I can't define the correct MimeType for the feed because it is an .php-file.

Having seen this Google-Query:
http://www.google.de/search?q=psp+laust ... rt=10&sa=N
I'm on the first place (because of a misspelling of lautstaerke, but anyway...) :)
BUT: Google writes "Fileformat unknown" and links directly to my RSS-Feed (http://www.gibts-doch-garnicht.de/index ... /index.rss)
Of course I want the visitors to visit my HTML-Pages, not the RSS-Feed.

What can I do, it's my own dedicated server, I can configure whatever is needed in the apache ;)

Re: MimeType for RSS

Posted: Tue May 16, 2006 11:19 am
by garvinhicking
Hi!

Hm, with this google query you're not on the first page anymore to me. Place #1 is http://www.weltweit-akku.de/product_inf ... ts_id/2081

RSS Feeds don't have a mimetype, they set a content-type. So, actually the bug is with google who does not seem to properly index RSS Feeds and links to the permalinks within RSS feeds.

Best regards,
Garvin

Posted: Tue May 16, 2006 11:33 am
by gibtsNicht
You are right, I'm the first entry on the second page (and the google-url has something like start=10).

And of course you are right - it's not the the MimeType, it's the ContentType (shame on me)... So I looked in rss.php and found

Code: Select all

header('Content-Type: text/xml; charset=utf-8');
After searching a little bit in the web I found some pages, e.g. this one: http://www.petefreitag.com/item/381.cfm
and therfor I changed this line to

Code: Select all

header('Content-Type: application/rss+xml; charset=utf-8');
I'll watch if it's better now

Posted: Tue May 16, 2006 11:41 am
by garvinhicking
Hi!

Okay, I'd be interested in how that changes things. I think there once was a reason why we used text/xml instead of application/rss+xml. I think mainly for Atom Feeds that should render on-screen with a XSLT, but I don'T remember...

Best regards,
Garvin