Question

I am dynamically generating rss ouput from a php file and the url to output the feed is http://mysite/rss-feed.php. I have followed this tutorial to generate the feed.

I have seen some of the rss output url, They wont be having any file extension. I am not using any MVC framework, so the url will have file extension also

As per my website is hosted in yahoo small business, I have no access to mod_rewrite and .htaccess file to hide the extension of .php

Even though I have set header("Content-Type: application/rss+xml; charset=ISO-8859-1"). I have doubt that all rss readers will consider my rss output and I have tested the rss ouput using W3C RSS validator tool, it says its valid RSS.

I have also got 2 questions

1) Is this the right way to tell readers to read the rss from php file insted of xml file.

2) Which is the better way to keep the url, http://mysite/rss-feed.php or http://mysite/rss-feed.

Was it helpful?

Solution

  1. Yes, the reader should care about the MIME type, not its extension.
  2. It doesn't matter, but I'd prefer the latter because it's shorter.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top