Humboldt State University

Skip to secondary navigation
Skip to content

University Web Office

Article

Redirecting web pages

There are two ways to redirect an old web page to a new web page at HSU:

Preferred method: .htaccess redirect

There may be a file called .htaccess in the public_html folder of your web account.  You will need to use an SFTP program to see it; you will not be able to see it from within Dreamweaver.  If it doesn’t exist, create the file.  Then make a backup copy of the file, and edit it using a plain text editor.  It is important to only use plain text when editing the file, do not use Microsoft Word or any other word processor. To the bottom of the file add the following line (line wraps are marked »—content marked in this way should all be on one line):

Redirect 301 /~account/file.html»
 http://newwebaddress.edu

replacing /~account/file.html with the current path to the file, and newwebaddress with the absolute address of the new file.  Upload the new .htaccess file and test your redirect.

To redirect an entire site (e.g. when moving a whole site from one account to another), use the following two lines instead (line wraps are marked »):

RewriteEngine on 
RewriteRule (.*) http://newwebaddress.edu/»
 [R=301,L]

Alternate method: meta redirect

This method can be done from Dreamweaver’s code view.  In the old file, add the following line between the <head> and </head> tags (line wraps are marked »):

<meta http-equiv="refresh" content="N;»
url=http://newwebaddress">

where N is the number of seconds the page waits before forwarding users to the web page listed as the “url”.

Leave a Comment

Commenting is not available in this section entry.

HSU Marketing & Communications
Building 88 • 1 Harpst St., Arcata, CA 95521 • 707.826.3321 • Contact Us.