Doing URL redirects using WebLearn

Sometimes it is very useful to add a level of indirection to your URLs – this would allow you to publicise a single fixed URL but periodically change what it is pointing to (behind the scenes).

This technique is called URL Redirection or URL Forwarding and generally has to be done at the Web server level. (A rule is usually added to the Web Server configuration file to say “when someone asks for ‘This URL’, instead send them to ‘That URL'”.)

We had a similar problem in WebLearn whereby we wanted to have a permanent link to a survey but wanted to renew the survey every academic year so we could export one year’s worth of responses. We didn’t want to keep the keep the survey open in perpetuity as previous year’s results would confuse matters.

Since each new survey in WebLearn has a slightly different URL to its predecessor, we needed a to implement some sort of indirection / redirect.

Imagine our surprise when we realised this could actually be done in WebLearn very easily by creating a publicly visible “Web Link (URL)” in Resources.

The procedure is as follows

  1. Enter Resources and select the Add Web Links (URLs) from the Add menu alongside a folder. (You may like to create a special folder to hold redirects.) You can do this in My Workspace as well as in regular sites.
  2. In the box labelled Web Address (URL) enter “survey” (or some other short word that describes the target  – one word, no spaces). Then click the Add Web Links Now submit button. This procedure will give your permanent URL a useful name.
  3. Locate your newly created Web Link. Use Edit Details to make it public, you can also give your redirect a better display name if you like.
  4. Now use Edit Content to supply the URL of the target document. Save your new data.
  5. Your work is now done. To test this out copy the URL of the Web Link either via the Edit Details page or by right mouse button clicking on the item in Resources and selecting the ‘copy link location’ option, (the terminology varies between browsers). Paste this copied URL into your browser’s address bar and you should see the target web page appear before your very eyes.
  6. If you wish to charge the target simply repeat step 4.
Posted in Sakai, Web, WebLearn | Tagged | Leave a comment

Comments are closed.