- Training Topics
- Campus Connections
- OSU IT Policies
Relative URLs can be set a couple of different ways in OSU Drupal, depending on what Drupal element you are using at a given time.
A base URL is the consistent part of your web address.
For example, throughout this CWS Training site, you'll note that the address section http://oregonstate.edu/cws/training always appears in the address bar. This is the base URL. Everything that follows it is known as a URL path.
To find the base URL of your website, go to the site's front page. What you see in the address bar on your site's front page is the base URL of your website.
URL redirects can be set right through the OSU Drupal interface, as long as the base URL of the new site matches the base URL of the old URL.
So, for example, a static site with the base URL of http://oregonstate.edu/cws/my-old-page.html could be redirected to a new page in Drupal that had the URL http://oregonstate.edu/cws/my-new-page.
This will also work with files. For example an image file located at http://oregonstate.edu/cws/old-directory/my-image.png could be redirected to a new file instance in Drupal that had the URL http://oregonstate.edu/cws/sites/default/files/new-directory/my-image.png.
An original base URL that differs from a new base URL will not work, though. So, for example, you would not be able to redirect something like http://oregonstate.edu/old-cws/my-old-page to something like http://oregonstate.edu/new-cws/my-new-page. The base URLs old-cws and new-cws are different and the new site will not recognize the base URL old-cws.
Here are some examples of rewrites that you can test out: