| For these examples, we will use http://www.racingsystem.com/
as our website. We will redirect some incoming requests to other sites. A redirect
statement can be placed either within virtual host section of httpd.conf or
within a .htaccess file within the website.
Here is my .htaccess file located at http://www.racingsystem.com/freebsd/.
This can also be placed within the virtual host definition of your httpd.conf.
Redirect permanent /freebsd http://www.freebsddiary.org/freebsd
As you can see, if you click on the above link, you wind up back at the FreeBSD Diary
home page. All URLs which specify the the /freebsd directory will be redirected to
the URL specified at the end of the line. Note: at that website I do even more
processing to get the people to the correct URL. See Rewriting
URLs within Apache for more information.
The above was an example of a moved directory. Now let us consider a moved file.
Here's what I do for that instance:
Redirect permanent /services.htm http://www.dvl-software.com/services.html
This example redirects all requests for http://www.racingsystem.com/services.htm
to http://www.dvl-software.com/services.html.
|