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 scripts.mit.edu to another website (such as web.mit.edu), follow these instructions:
1. Create a directory for the redirect. In these examples, we will be redirecting http://mygroup.scripts.mit.edu/subpage/ to http://www.example.com/other/website/, 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/ http://www.example.com/other/site/
RedirectPermanent /subpage/ http://www.example.com/other/site/
This will send requests to either http://scripts.mit.edu/~mygroup/subpage/ or http://mygroup.scripts.mit.edu/subpage/ to the right address. It will also redirect, e.g., http://mygroup.scripts.mit.edu/subpage/foo.html to http://www.example.com/other/site/subpage/foo.html.
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 mygroup.mit.edu-style address (a CNAME) to redirect to an outside site, then add at the bottom
RedirectPermanent / http://www.example.com/other/site/
4. Make sure to make the .htaccess file available to Apache by running the command chmod .htaccess 777.
More information about redirect rules is available in the Apache documentation.
You can also set up your web.mit.edu or www.mit.edu site to forward to scripts.

| Previous: | How do I upload more file types to my MediaWiki? |
| Next: | How do I enable additional PHP extensions? |
These pages may be reused under either the GFDL 1.2 or CC-BY-SA 3.0.
Questions? Contact scripts@mit.edu.
You are currently connected to bees-knees.mit.edu.
