Relevant

A New Template for Joomla!

 

Redirecting an Entire Website Using .htaccess

When I decided to change the domain for my Joomla website mundy.net.au to blog.mundy.co, I needed a way to ensure that all traffic from my old URL was not lost - I get quite a few hits from Google. 

I used the following .htaccess file to redirect mundy.net.au to blog.mundy.co. If both olddomain and newdomain point to the same server filespace, then you will need to tell this rewrite rule not to redirect newdomain to itself, which it will do unless told otherwise.The added RewriteCond prevent the rule from being applied unless the requested domain is NOT "www.newdomain.com"

Options +FollowSymLinks
RewriteEngine on
#
RewriteCond %{HTTP_HOST} !^blog\.mundy\.com
RewriteRule (.*) http://blog.mundy.co/$1 [R=301,L]