0

Is it possible to change the content type of a url via the htaccess file?

I'v got name.tld/foo/bar which has the content type html in the header informations. thats a mod rewrited site from a cms. including xml data structure. but this should get an xml header to be valid. unfortunately I can not do that in the code, because this is rendered out of a terrible cms.

so i will try to do that with AddType 'text/html; charset=UTF-8' .html ... but not for all html files. is it possible to add an url instead of .html?

  • a little tweak on this can give you an answer.. http://stackoverflow.com/questions/6169002/force-video-webm-mime-type-using-htaccess-based-on-request-uri – reikyoushin Dec 09 '13 at 20:39
  • RewriteRule someRegEx$ - [T=text/xml] so: RewriteRule /foo/bar$ - [T=text/xml] ? that doesn't work. – user3084355 Dec 09 '13 at 21:05

0 Answers0