<P>When retrieved, Redirection files will make the client automatically jump to a chosen URL. Why would you want to do this? Well, the users of WWW sites come and go; people accessing out-of-date URLs will often be faced with a screen saying something like "<I>The requested object does not exist on this server</I>". Instead of having this, server administrators can simply set up a Redirection file which automatically points the client to the new location for a resource.</P>
<P>Clients that support redirection will automatically jump to the specified URL. Those that don't will display a referral screen, generated by Netplex, that contains a link to the specified URL.</P>
<P>For example, the following file will automatically redirect users to the root page of your WWW server :</P>
<PRE><P>
# Example Redirection file
#
# Typical codes are:
# 302 - Moved Temporarily
# 303 - Moved Permanently
#
# The URL given is GSTrans'd so you can
# include references to system variables
# to facilitate running your server on a
# dynamic-IP machine.
#
Redirect
302
http://<CGI$ServerName>/
</P></PRE>
<P>The line, 'Redirect', specifies that this configuration file is a redirector. The next line, '302', specifies which sort of move the requested object has had. 302 means the move is temporary and 303 means the move is permanent (clients tend not to be bothered about which you use). The line after that specifies the URL to jump to. In this case it simply tells the client to go to http://<CGI$ServerName>/ - the root page of the server - although it can be any valid URL. The URL you give is passed through GSTrans so system variables can be used in it, as is the case here.</P>
<P>Redirection files can also be used to generate <B>any</B> server message. Look in the Messages file for the full list of server messages that Netplex can produce. For example :</P>
<PRE><P>
# "Gone"
Redirect
410
-
</P></PRE>
<P>Will generate a <I>Gone</I> message to the client when it is retrieved. In this case the URL doesn't matter and it doesn't matter what you put on the last line, although you must still have the last line there.</P>