different ways to do this
you can use the meta refresh html code to handle this
<meta http-equiv="refresh" content="N; URL=other-web-address">
which is included in the head portion of your code. you can also use htaccess to do this via
Redirect /courses/2007spring/PHY386/index.html
http://www.pa.msu.edu/people/username/subdir/index.htmjavascript isnt a very good way to handle this. and some portable web browsers and almost all normal browsers with noscript install block java and javascript on the spot.