Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have a problem sending http-410 for very old rss feeds. Functional this can happen in one

  1. Very old rss feeds where content is not updated anymore / subject could not move to another feed
  2. Migration from 3th party site to our site where the rss feed is not longer functional supported

I tried several things in my site config see below;

<VirtualHost *:80>

        DocumentRoot /opt/tomcat/webapps/ROOT/
        ErrorDocument 500 /error/static/error-500.html
        ErrorDocument 503 /error/static/error-500.html
        ErrorDocument 404 /error/static/rss/error-404.html
        ErrorDocument 410 /error/static/rss/error-410.html

        # When error pages need to be served by apache,
        # exclude the files to serve as below (in comment)
        SetEnvIf Request_URI "/error/static/*" no-jk


# force all files to be image/gif:
<Location *.rss>
#<Location *>
#ForceType application/rss+xml
</Location>
#AddType application/rss+xml .rss
#AddType application/rss+xml .xml
#AddType application/rss+xml .html


        JkMount /* rss;use_server_errors=402
#        JkMount /* rss

        RewriteEngine on


        JkMount /news.rss rss
        JkMount /documenten-en-publicaties.rss rss

        RewriteEngine on

        RewriteRule ^/news.rss$ - [NC,T=application/rss+xml,G,L]
        RewriteRule ^/documenten-en-publicaties.rss$ - [NC,G,L]

        # Possible values include: debug, info, notice, warn, error, crit,
        # alert, emerg.
        LogLevel warn

        ErrorLog "|/usr/bin/logger -s -p local3.err  -t 'Apache'"
        CustomLog "|/usr/bin/logger -s -p local2.info  -t 'Apache'" combined
        ServerSignature Off
</VirtualHost>

The desired end result should be on /news.rss and /documenten-en-publicaties.rss a 410 page with content in the error page with a content type 'application/rss+xml'

share|improve this question
add comment

1 Answer

up vote 0 down vote accepted

After a long road, I found a solution. At the end I had several problems but to fixes this problem I changed the error document to a xml, and added a AddType

       ErrorDocument 410 /error/static/rss/error-410.xml

And added the following type

AddType application/rss+xml .xml

This fixed to content type of the 410 error document.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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