14. Re-directing to a different site

If you have moved your site from users hosting to a different one either inside or outside of the university you will probably want to re-direct your site visitors to the new location. This is easy to do by:

  1. create a .htaccess file using a text editor
  2. Type in the following code changing myusername to your username and replace www.my-new-site.com with the real location of your site:

    Redirect /~myusername http://www.my-new-site.com/

  3. Save and upload to your users webspace. Visitors to your users web space will now automatically be re-directed to the new location.

Up: Contents Previous: 13. Writing your own Safe Perl.