MIT SIPB Script Services for Athena

Can I set up my scripts site to forward/redirect to another website?

Yes. If you would like to redirect all web requests for a given URL on to another website (such as, follow these instructions:

Note: These directions are only appropriate for redirecting a URL on your site to another URL that is not also on your scripts site. If you want to, for example, cause to take people to, please skip to the directions at the end of the page.

1. Create a directory for the redirect. In these examples, we will be redirecting to, so create the “subpage” directory:
athena% attach mygroup
athena% mkdir /mit/mygroup/web_scripts/subpage

2. Create a text file named .htaccess within your the new directory, e.g.:
athena% cd /mit/mygroup/web_scripts/subpage
athena% emacs .htaccess

3. Place two lines like the following in the .htaccess file:
RedirectPermanent /~mygroup/subpage/
RedirectPermanent /subpage/
This will send requests to either or to the right address. It will also redirect, e.g., to

If you would like the redirect not to be cached by web browsers (e.g.,if you’re planning to change the redirect or set up a scripts site at this address), use “RedirectTemp” instead of “RedirectPermanent.”

If you’re also planning to get a address (a CNAME) to redirect to an outside site, then add at the bottom
RedirectPermanent /

If, instead of redirecting visitors to a different website, you wish to cause visitors who go to to be redirected to (or something similar), you can do the following:

1. Create a text file named .htaccess in your locker’s web_scripts directory (or edit an existing one), e.g.:
athena% cd /mit/mylocker/web_scripts
athena% emacs .htaccess

2. Place a line like the following near the top of the .htaccess file:
RedirectMatch ^/?$ /wiki
This will only send requests to to the initial address for the wiki. It will not interfere with the way the rest of your existing URLs work.

More information about redirect rules is available in the Apache documentation.

You can also set up your or site to forward to scripts.

© 2004-2020, the SIPB project.
These pages may be reused under either the GFDL 1.2 or CC-BY-SA 3.0.
Questions? Contact

You are currently connected to