How do I redirect web pages?

Redirection of web pages can be done in several ways, depending on your website structure and the target location.

CNAMEs

CNAME records allow a website within UIC’s control to be referred to by another, usually simpler or more readable name. For example, if you have a virtual server named vm.deptserv.uic.edu and want visitors to access it via mydept.uic.edu, the Technology Solutions can create a CNAME. (As an additional step in this example, the target server would also need to be configured to serve content as mydept.uic.edu.) CNAMEs can also be used for websites hosted externally, such as Google Sites. Using a CNAME, the URL stays the same in the visitor's browser's URL bar.

To request a CNAME, you must be a department webmaster or netsec designated liaison, or authorized to do so by one.

  • Top-level (*.uic.edu) requests are only available to administrative units

  • Subdomain (sitename.engr.uic.edu) requests are only available within their owning departments

  • *.lab.uic.edu - specifically for labs

  • *.class.uic.edu - specifically for academic classes

  • *.org.uic.edu - specifically for student organizations

Shortened URLs

Use your Webtools Toolbox to create a short, stylized URL with the format: http://go.uic.edu/shortname.  The shortname portion of the example URL is first-come, first served; If the URL isn't already used by someone else at UIC, you can create it and use it to redirect to any URL on the web. These URLs are typically used for social media and marketing materials. An additional benefit to using UIC’s shortened URLs is that https is preserved in target the target address, making it possible to guarantee a user arrives at a target site’s https secure presentation.

Custom redirection

When websites change their address, it is always wise to ensure visitors to the old address are forwarded to the most appropriate new location; very much like postal forwarding. There are three typical scenarios for redirection once a site has moved one or more of its pages (or moved entirely):

  1. General redirect (e.g. www.uic.edu/dept/example/x www.uic.edu/dept/example/y www.uic.edu/dept/example/z are all redirected to example.uic.edu). This is common for new websites intended to replace an old website.

  2. 1-to-1 redirect (e.g. www.uic.edu/dept/example/x www.uic.edu/dept/example/y www.uic.edu/dept/example/z are redirected to example.uic.edu/x example.uic.edu/y and example.uic.edu/z, respectively). This is common for sites moved without fundamental change to the site.

  3. Combination of above (e.g. redirecting to example.uic.edu is generally the best option, but there are 1 or more specific pages that need specific 1-to-1 redirects). This is common with new websites where pages correspond but do not have URLs similar to the old site.

To request custom redirection, visit our Domain Name System service page.

Default filenames

By default, if you don't specify a file name in a URL, the web server will search for the files index.html, index.htm, index.shtml or index.cgi and use the first one found. Publishing a URL that uses a default filename has two advantages:

  1. No need to specify the filename extension

  2. Easy to redirect using index.asis

For example, if your website is located at ​http://www.uic.edu/depts/mydept/ your directory structure could look like:

/depts/mydept/
/depts/mydept/about/
/depts/mydept/contact/
/depts/mydept/events/
/depts/mydept/another-page/
...

Each directory would in turn contain an index.html or index.shtml (if you use server-side includes). Rather than publishing a URL that includes the filename, you could leave it as http://www.uic.edu/depts/mydept/about​ and leave the /index.html part out.

Print Article

Details

Article ID: 542
Created
Fri 1/15/21 5:50 PM
Modified
Mon 11/7/22 12:28 PM