Server-Based Redirect

Last updated: January 12, 2023
Audience: All UW

Instructions

The following instructions show how to set up redirection for a website on the depts.washington.edu. With minor substitutions, the same method works for websites on other UW Web servers.

  1. Make sure your new website is up and running and ready for public browsing. Visitors will be redirected from your old website to your new website as soon as you have completed these steps.
  2. Log into your web development server using a terminal emulator. If you’re not sure how to do this, click here for instructions.
  3. At the prompt, enter the following command to change into to your Web directory:

    cd public_html

  4. Edit the server directive file of your old website. To do so using the Pico editor, enter:

    pico .htaccess

  5. Add the following lines to the file:

    RewriteEngine on
    RewriteRule ^(.*)$ http://newsite.washington.edu/ [R=301,L]

    Replace http://www.newsite.washington.edu with your new website’s location.

  6. Save and close the file using Pico. (Click for instructions on how to use pico).
  7. That’s it! Check your site to make sure it’s working properly.