In a number of places on our website, we have multiple URLs applied e.g.
- http://www.uni.edu.au/courses/ and
[*]https://www.uni.edu.au/courses/ and
[*]http://www.uni.edu.au/courses_2013/
We would like to make the first URL (as listed in asset > web paths > Current URLs) the primary URL, preferably by having the other URLs return HTTP 301 headers and sending the user to the correct location. Or by placing <link href="http://www.uni.edu.au/courses/" rel="canonical" /> in the HTML <head> area.
I've looked through the matrix key words and done some basic testing the %asset_url% keyword won't do the job because it only seems to print the current URL being used.
Currently matrix only seems to supports 404 and 301 pages set at site root level and thus applied site wide. Is it possible with Matrix to control the HTTP headers at the design level (so we can create custom 404 and 301 pages for various parts of the site)?
Is it possible to target and print the first URL listed in the "current URLs" list?