Forum Moderators: open
Without this, your RSS is of course, valid, but some systems/programs may have some problems:
Warning
This feed is valid, but may cause problems for some users. We recommend fixing these problems.Feeds should not be served with the 'text/plain' media type [help [feedvalidator.org]]
To fix this, simply add the following code to your .htaccess file:
AddType application/rss+xml .rss
Sid
[edited by: Brett_Tabke at 1:29 am (utc) on April 15, 2004]
[edit reason] fixed link [/edit]
Add this as the first line of your script
header("Content-type: application/rss+xml");
(or /atom+xml, delete as appropriate) and it ought to pass the new validation requirements.
Cheers,
Scott
<Files your-feed-name.rss>
ForceType application/rss+xml
</Files>
Good luck,
Sid
the regular line added to have all .rss files served properly would be
AddType application/rss+xml .rss
LL files on your domain that are in the folder AND any of its SUB-folders of that .htaccess file.
it is enough to put that line into the .htaccess of the ONE folder you store all .rss feeds since it normally never is used escept for .rss files and if applied system wide may delay apache server a little for each page call.
if you have NO .htaccess file there ( and your site is running an apache server )
then you may create a .htaccess file and upload it into the folder containing your .rss files
use a regular unix editor on you linux system ( or whatever -ix system you have )
an empty text file
name .htaccess
content on a single line
AddType application/rss+xml .rss
upload ftp in ASCII!
chmod 664
and that error message should disappear because it menat that your server did serve the rss files as text/html files due to missing above LINE in .htaccess OR apache httpd.conf
by that additional line apache will handle the file differently when "serving" files with that extension .rss
.htaccess usually can be created/configured by any site
owner using a regular commercial domain host service.
apache is looking by default in every folder for a .htaccess
for any further problems or a full RSS howto for beginners you may want refer to
[kriyayoga.com...]
ronin, I remember reading somewhere--right after the validator got picky about mime-type--that there was a statement you could add as the first line of your feed that would correct the mime-type. Apparently, it would be interpreted as part of the header. I just cant't find it, though!
Obviously, this is a problem for people on shared hosting, or who can't easliy re-configure their servers.