Unexpected mime type

Discussion in 'Apache' started by lektrikpuke, Jul 11, 2009.

  1. #1
    Hi y'all,

    I tried to get tricky and make an RSS feed with php. The page works flawlessly. However, when I try to validate the feed (at http://feedvalidator.org/) it gives me the following error:

    Feeds should not be served with the 'type/subtype' media type

    The web server is reporting an unexpected MIME type for a feed. Although we tried to parse it as a feed, aggregators may well report this as an error and act as if the user had pointed them at something other than a feed.

    Note: I'm using a .htaccess rewrite to make it appear to be an xml file.

    How can I fix this?

    Thanks.

    Rob :D
     
    lektrikpuke, Jul 11, 2009 IP
  2. aquilax

    aquilax Member

    Messages:
    126
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    33
    #2
    Use an the top of the script:
    header("Content-Type: application/rss+xml");
     
    aquilax, Jul 12, 2009 IP
  3. lektrikpuke

    lektrikpuke Well-Known Member

    Messages:
    297
    Likes Received:
    1
    Best Answers:
    1
    Trophy Points:
    113
    #3
    Thank you. It's amazing how something so little can have such an impact. Thanks again. :D
     
    lektrikpuke, Jul 12, 2009 IP