Redirecting web pages

How to redirect web pages from your CAE homepage area

The .htaccess files uses relative paths. The following would redirect index.html:

Redirect 301 index.html http://hydroecology.cee.wisc.edu/

That will redirect *only* the index.html file if and only if the client web browser asks for "http://homepages.cae.wisc.edu/~loheide/index.html" and not "http://homepages.cae.wisc.edu/~loheide/" (which the web server maps to the same file)

You can get the "slash path" to redirect with this:

RedirectMatch 301 ^$ http://hydroecology.cee.wisc.edu/

Where ^$ is a regular expression for a null string.

Finally if you want to redirect absolutely everything under ~loheide to your new site you might just want to use this:

RedirectMatch 301 ^.*$ http://hydroecology.cee.wisc.edu/

Therefore anything like http://homepages.cae.wisc.edu/~loheide/some/long/path/to/a/file.html would also return a permanent redirect to your new site.




Keywords:Homepage redirect 301 .htaccess   Doc ID:7804
Owner:Jeff B.Group:Computer-Aided Engineering
Created:2008-05-27 19:00 CDTUpdated:2015-09-02 15:01 CDT
Sites:Computer-Aided Engineering
Feedback:  0   1