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
- 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.
- 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.
- 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.
- Now use Edit Content to supply the URL of the target document. Save your new data.
- 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.
- If you wish to charge the target simply repeat step 4.