Redirect to a Different URL using .htaccess
You can use .htaccess to redirect users to a different URL.
The .htaccess looks for any request for a specific page and if it finds that request,
it forwards it to a new page you have specified.
The syntax is:
redirect accessed-file URL-to-go-to
There are 3 parts;
(1) the Redirect command,These parts are separated by a single space and should be on one line.
(2) the location of the file/directory you want redirected, and
(3) the full URL of the location you want that request sent to.
For example, if you want to redirect users from oldfile.html
in the www directory of your account, myaccount,
to newpage.html, the syntax should be
redirect /~myaccount/oldfile.html http://www.indiana.edu/~myaccount/newpage.html
Anyone going to http://www.indiana.edu/~myaccount/oldfile.html
will end up on http://www.indiana.edu/~myaccount/newpage.html.
You must use a full URL even if you're going to send the users to another page on your own site.
You can also redirect an entire directory:
redirect /~myaccount/old_dir/ http://www.indiana.edu/~myaccount/new_dir/
Anyone going to http://www.indiana.edu/~myaccount/old_dir/filename.html will end up on http://www.indiana.edu/~myaccount/new_dir/filename.html.
After you set up the redirect, you should test it by going to the old URL.
You can also redirect users using Meta tag http-equiv refresh.
For instructions, see
Using the Meta Tag "Refresh" to Redirect to a Different URL.



