Redirecting site using apache configuration

From Notes_Wiki
Revision as of 04:23, 7 November 2012 by Saurabh (talk | contribs) (Created page with "=Redirecting site using apache configuration= There are many ways of reidrecting websites using apache. Most of them are discussed at http://www.yolinux.com/TUTORIALS/ApacheR...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Redirecting site using apache configuration

There are many ways of reidrecting websites using apache. Most of them are discussed at http://www.yolinux.com/TUTORIALS/ApacheRedirect.html The two important ways of redirecting websites among the ones mentioned at given URL are

Using mod_alias

Redirect permanent / http://www.new-domain.com/


Using mod_rewrite

RewriteEngine On
RewriteRule /.* http://www.new-domain.com/ [R]