Plone redirects

Kenny asked that we now start redirect requests from the old Plone student-services pages to the new EdWeb pages, rather than just relying on the “This is old” banner that put on all the Plone pages.

So he sent a list of specific “this goes to that” redirects and also a request for a “catch-all” so that all other old student-services pages just be redirect to the new student-services front page. Remembering that there are still small pockets of Plone content that are still needed (until we have restricted viewing permissions in EdWeb), and that these should be excluded from the redirects (and the “This is old” banner).

I set this up, and tidied up some of the other adhoc ISS redirects in the server config, and it nearly “just worked”! I missed a couple of things.

The Plone pages not redirected contained resources links to images, style sheets, javascript etc. As these were being caught by the catch-all and redirected, the remaining Plone pages soon looked broken! It was simply fixed by adding the various resource links to the exception list of what not to redirect. There was also a similar problem for the “your not authorised” page if you tried to access the remaining Plone content that required authorisation to view. It too was fixed the same way.

RewriteCond $1 !^/student-services/(acl_users|portal_javascripts|portal_css|porta_kss|kupudrawers|plonekupuimages|kupu[a-z]+\.xml|[^/]*.(gif|jpg|ico|png))
RewriteRule ^(/student-services/.*) http://web.inf.ed.ac.uk/infweb/student-services [R=permanent,L]

Yes it could be a bit more efficient, but I think this is clearer!

Neil

Leave a Reply

Your email address will not be published. Required fields are marked *