rdb-delivery-server-mime-type.png
  • RedDot CMS Blog
  • 07.12.2016
  • EN

rdb: How to set MIME types in RedDot LiveServer (Open Text Delivery Server)

How to set MIME types in RedDot LiveServer / Open Text Delivery Server – It’s easy if you have the DynaMent

Have you ever tried to deliver anything else than HTML files with your LiveServer? Well, in case you have one of the fancy Open Text Delivery Servers and you have set up the webserver properly (as described here) they should run fast and stable.
 

For what would I use this trick? RSS feeds!

Now you have for example a RSS Feed to publish but the page doesn’t work in Internet Explorer. Or maybe the XML doesn’t show up properly in Firefox? Eventually you have to find out that the MIME Type is wrong. The reason is that the default MIME type in RedDot LiveServer is set to “text/html”.

Now all you have to do is change it. Lucky there are some RedDot consultants here to help you with this!
 

How do you tell Delivery Server what MIME type you want?

Whenever you want LiveServer to return something as XML file you have to add a DynaMent to your RedDot CMS content class.
For the correct rendering of your content add this DynaMent at the top ! of your content class:

 Dynaments 
<rde-dm:attribute mode="write" attribute="request:rdeResponseMimetype" op="set" value="text/xml"/><?xml version="1.0" encoding="utf-8"?>

Tell the DeliveryServer that your MIME type is “text/xml” you will get a proper XML file delivered to all browsers requesting this document.

 

Social Media