Sunday, January 13, 2008

Redirecting Website Using Apache Web Server

There are many methods to redirect a website or a webpage to another domain.

I have explained 2 options.

1. Use Apache Module (mod_rewrite)

In the Httpd.conf file

RewriteEngine On
RewriteRule /.* http://www.newdomain.com/

2. Use Apache Module (mod_alias)

In the Httpd.conf file

^Redirect domain
Redirect / http://www.newdomain.com/

^Redirect page
Redirect /webpage.html http://www.newdomain.com/new_webpage.html/

No comments: