UnixServerAdmin

Server Administration & Management

How to redirect from one page to another using .htaccess

If you want to redirect one page to another page, then add the following code in the .htaccess file in one line :

# vi .htaccess
==============================================================
redirect 301 /oldfile.htm   http://www.domain.com/newfile.htm
==============================================================

Advertisements

March 12, 2011 Posted by | Apache, htaccess | , , | 6 Comments