I want to rewrite http://www.ourdomain.com/feed/ in the .htaccess file

to http://ourdomain.com/feed.xml

And we have some other feed URLs to Rewrite. After a search I could not find the correct solution. I tried a few .htaccess entries, but none of it w worked.

Or: probably someone knows how to bring rss-feeds into this format (with file-extension) in the url. The requirement is that we use a third party provider which has to read this url, but does not access /feed/ format without the .xml extension.


  • 1
    Could you please include your .htaccess attempts? It might be easier and faster to point out how to make them right than research, write, and test them from scratch.
    – Rarst
    Oct 10 '14 at 9:17
  • Handle it in the 404 to trigger XML output based on the URL requested. Or add a URL rewrite.
    – jgraup
    Jul 31 '16 at 17:18

Just use a fake query parameter on the URL to get around those sort of bad restrictions in other pieces of code.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.