Access Keys:
Skip to content (Access Key - 0)

Web Publishing - Redirects

Working with files on Athena

The Following instructions assume you know how to access and work within your Athena locker. Detailed instructions are available for Using SecureFX on Windows and for using Fetch on macOS.


When you rename or move a page that results in a URL change, a redirect is required. Otherwise, users following links to the old URL will get a 404 (Page not found) error.

Since you may have users who have bookmarked specific pages on your site or there may be other web sites linking to your pages, it's a good idea to set up a redirect that automatically re-routes visitors instantly to the correct location.

The Apache mod_alias module is installed on and provides Redirect and RedirectMatch directives that can be configured for any directory and locker on The advantage to using these two directives is that setting a 301 (redirect permanent) code will allow search engines to pick up on the new page and update its indexes to no longer reference the old location. It also does not require the old page to still exists or to be loaded.

Don't use meta-refresh
The old meta-refresh tag used in page headers is no longer recommended. This tag used to be embedded in the header of HTML pages, but it required the old pages to remain around, and creates more overhead for the visitor as the old page needs to be loaded before the browser is redirected to the new one. If you are still using meta-refresh, we recommend that you use Redirect or RedirectMatch instead.

mod_alias, Redirect, and RedirectMatch

mod_alias provides instantaneous redirection for pages that have moved. By providing the appropriate HTTP response codes, using these directives vs. the meta-refresh approach will improve your search engine listings (internally and externally), and reduce the work each of your visitors' browsers needs to do.

By customizing your file (in this case usually one at the root of your website, in the same directory as your home pages) you can indicate whether certain content has moved temporarily, permanently or has been removed altogether.

Redirecting single pages or directories

The below examples show how to redirect single locations to locations at a new site. Note that the original page location referenced in your redirect should begin with a / and the name of your locker on {[}}. So if your old page URL was then your redirect should reference /old/about.html.

The redirect entry in the file will have four components in the specified order:

The Redirect directive Type of redirect Old location New location

Here are several examples of how to use Redirect to redirect specific locations to their new ones.

# Two ways to create a permanent redirect sending visitors
# going to to
Redirect permanent /old/page.html
Redirect 301 /old/page.html

# Two ways to create a temporary redirect sending visitors
# going to to
Redirect temp /old/page.html
Redirect 302 /old/page.html

# Two ways to create a "page removed" redirect sending visitors
# going to to and letting search engines
# know that an equivalent page does not exist on the new site
Redirect gone /old/page.html
Redirect 410 /old/page.html

Other HTTP result codes are supported as well, but the ebove three are the most commonly used ones for site redirects. Note that Redirect will do a prefix match, so if you do not specify each page fully, this can lead to unpredictable results. For example, this redirect:

# Create a permanent redirect for locations that begin with
Redirect 301 /old/

will only work if there is an equivalent page for every old page on the new site. It will redirect to, to, and so on.

Redirecting patterns and matching subsets of pages

The RedirectMatch directive can be used to redirect certain pages and locations based on matched patterns and wildcards. You can redirect many pages at once using pattern matching, or target a specific page. You can also reference portions of the original page name in the destination for your redirect. For example:

# Permanently redirect every page in the "web" directory at
# to its matching page on the new site in the "two" directory. For example, 
# the old page would be redirected to
RedirectMatch 301 ^/one/web/(.*)$$1

The RedirectMatch directive is very powerful and can be used for complex pattern matching and redirects. For more information, see: Apache Group's documentation on RedirectMatch.

Perl Regular Expressions not supported
The mod_alias that runs on is an older version that doesn't support Perl-Compatible Regular Expressions (PCREs), only POSIX Extended Regular Expressions (EREs). This means it will only provide the level of regular expression support typically available in the egrep command.

IS&T Contributions

Documentation and information provided by IS&T staff members

Last Modified:

August 07, 2018

Get Help

Request help
from the Help Desk
Report a security incident
to the Security Team
c-web-publishing c-web-publishing Delete
htaccess htaccess Delete
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.
This product/service is:
Easy to use
Difficult to use

This article is:
Adaptavist Theme Builder (4.2.3) Powered by Atlassian Confluence 3.5.13, the Enterprise Wiki