Name
Redirect
Synopsis
Redirect [status] pathname
url
Description
[server config, within <VirtualHost> or
<Directory>, or .htaccess]
Tells the server to forward clients that request a given directory
or document, pathname, to a new location, specified by url.
This new location must be a complete path, unless the status given
is gone, in which case the new location must be omitted. The
Redirect directive supersedes any Alias or AliasMatch
directives that are specified.
The status variable can be one of the following:
-
permanent" This option uses an HTTP status 301 to indicate to the client that the redirect should be considered permanent.
-
temp" This option uses an HTTP status 302 to indicate to the client that the redirect is only temporary. This is the default.
-
seeother" This option uses an HTTP status 303 to indicate to the client that the resource requested has been superseded or replaced.
-
gone" This option uses an HTTP status 410 to indicate to the client that the resource has been removed.
(Apache 1.2 or later)
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access