Difference between revisions of "Redirecting site using apache configuration"
From Notes_Wiki
m |
m |
||
Line 17: | Line 17: | ||
RewriteRule /.* http://www.new-domain.com/ [R] | RewriteRule /.* http://www.new-domain.com/ [R] | ||
</pre> | </pre> | ||
mod_rewrite is very powerful and can achieve powerful results. For detailed help on mod_rewrite visit https://httpd.apache.org/docs/current/rewrite/ |
Revision as of 02:51, 4 March 2013
<yambe:breadcrumb self="Redirecting sites">Apache web server configuration</yambe:breadcrumb>
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]
mod_rewrite is very powerful and can achieve powerful results. For detailed help on mod_rewrite visit https://httpd.apache.org/docs/current/rewrite/