The Apache Redirect directive allows you to tell clients and browsers about documents which used to exist in one place but have since moved. This allows you to tell the clients and browsers where to look for the relocated document.
<virtualhost 192.168.1.100>
servername www.vincentwong.net# redirect errors page to some where else..
ErrorDocument 404 http://error.vincentwong.net
# list of redirects for registered pages
# please note the + characher shows where the
# line wraps in this example. the command should
# all be one one line
Redirect /index.html http://test.vincentwong.net/index.html
Redirect /login.html http://test.vincentwong.net/login.html
# or we can use this as redirect:
Redirect permanent /index.html http://test.vincentwong.net/index.html/
Redirect permanent /login.html http://test.vincentwong.net/login.html/
</virtualhost>
Alternatively, you can redirect by using “refresh directive”
<META HTTP-EQUIV="Refresh" Content="0; URL=http://www.vincentwong.net/dir1/">
Also See:
No user commented in " Apache Redirect Directive "
Follow-up comment rss or Leave a TrackbackLeave A Reply