I have a XML page http://www.example.com/page, but my server outputs it as text/plain as it doesn’t have any extension.
So I want to add XML Header via .htaccess to all the files which doesn’t have extension with a condition that the file exists.
As if file doesn’t exist, program is executed from database and it decides what header to output, so I don’t want to break that part by forcibly changing header.
Add a
DefaultType text/xml(or whatever type you’re using for your XML) to your.htaccess.