[ start | index | login ]

redirects

Created by david. Last edited by retep, one year and 114 days ago. Viewed 917 times. #3
[diff] [history] [edit] [rdf]
labels
attachments

Redirecting an Incoming Request

Somtimes you have content which has been moved or deleted, but you'd like to return something to the client instead of the dreaded 404 response. In this case, you can use the Redirect directive to specify what you want to do:

# Temporary Redirect (code 302)
Redirect      /your/path/file.html http://yourdomain.com/some/path/file.html
Redirect temp /your/path/file.html http://yourdomain.com/some/path/file.html

# Permanent Redirect (code 301) Redirect permanent /your/path/file.html http://yourdomain.com/some/path/file.html

# Moved (code 303) Redirect seeother /your/path/file.html http://yourdomain.com/some/path/file.html

# Gone (code 410) Redirect gone /your/path/file.html

Note, these do not have to be static html files; the incoming and redirected requests could be to any resource type.

no comments | post comment
Powered by snipsnap.org Found a mistake in a howto? Let us know via an email to p.blikibugs at rimuhosting com.