OREGON STATE UNIVERSITY

OSU Drupal

How do I set a relative URL in OSU Drupal?

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.

What is a base URL?

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.

How do I set a URL redirect in OSU Drupal?

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:

This is a redirect test from a static page that uses an .html extension.

This is a redirect test from a static page that uses an .htm extension.

This is a redirect test from a file from a static site into sites/default/files.

How do I embed a Google calendar in my Drupal site?

Image

A Google calendar can be easily embedded into your Drupal site.  Before doing this, though, you must have an available Google calendar.  To create a Google calendar, please refer to Google's Calendar help instructions.  After creating a Google calendar, just use the instructions below to embed it into your Drupal site.