Skip to content Accesskey=4Skip to sub-navigation Accesskey=NView our Accessibility Options MIT Information Services and Technology Home About IS&T Contact IS&T Site Map Search Advanced Search
Getting StartedGetting Services by Topic or Alphabetically Getting Help

Web Publishing Reference
 

Web Reference home

MIT Guidelines

Creating Web Pages

Web Toolkit
Advanced Topics

 

CGI Scripts
Custom 404
Hit Counting
HTTPS
MIT Search
Redirect
SSI
Web Forms
Basic Topics

Using MIT Web Space

web.mit.edu Resources

MIT/IS&T Resources

Training

Search the Web Reference:

 

Permanent Redirects

Sometimes you rename a page, or you move a page or site from one directory location to another. This results in a change in URL for that page or site. Whenever you change the URL of a page or a site, you need to redirect your visitors to the new URL. Users may have bookmarked the old URL or other web pages may link to it.

Without redirection, users following links to the old URL will get a 404 (Page not found) error. Redirection will automatically route the user to the new location, invisibly. You get the added benefit of properly "announcing" to search engines to remove the old url and add the new to their indices.

So, how do you redirect your site visitors to the new URL? It's easy. You need to add a statement to your .htaccess.mit file at the uppermost level of your web site. You may already have an .htaccess.mit file, if you've implemented SSL protection or a custom 404 page for your site.

If you do not already have an htaccess.mit file, not to worry. There's no magic involved; it's a simple text file. It contains rules you wish your web server follow under specified situations. In this case, you're stating where you want to send visitors seeking your old URL. The statement will read:

Redirect 301 /lockername/old_url http://web.mit.edu/my_site/new_url

That's it! Don't forget the leading "." or the "mit" extension in your .htaccess.mit filename if your site is hosted on Athena. Upload it and you're ready to go.

For more detail on permanent redirects, see http://www.tamingthebeast.net/articles3/spiders-301-redirect.htm.

 

MIT Home | Getting Started | Getting Services | Getting Help | About IS&T | Accessibility
Ask a technology question or send a comment about this web page.

Mit Counter