Now Available:
Redirect
RedirectTemp
RedirectPermanent
Redirect virtual URL
RedirectTemp virtual URL
RedirectPermanent virtual URL
virtual
is the translated location which
should trigger a redirect..
URL
is the URL of the
new document.
Several Redirect directives may appear in the configuration file.
The Redirect directives are allowed in all Resource Configuration files
(srm.conf) and Per Directory Configuration files (.htaccess).
Redirect /dir1 http://newserver.widget.com/dir1
This would cause requests for /dir1 to be redirected to the new
location, http://newserver.widget.com/dir1
.
/dir1/wow
would be redirected to
http://newserver.widget.com/dir1/wow
.
In the By Directory files (.htaccess), Redirects do a full string comparison,
such that in the example above, only requests to /dir1
exactly will be redirected to
http://newserver.widget.com/dir1
.
In Multihome support, Redirects are supported in the default srm.conf file, as well as other configuration files. If you don't give any Alias/ScriptAlias/Redirect directives in the specific resource file, the ones from the default will be used. If you give any of the above in the specific resource file, then only those will be available for that hostname.
Redirect and RedirectTemp return 302 Temporary Redirects (as Redirect has allows done). RedirectPermanent returns 301 Permanent Redirect.