apache virtual host redirect

If a resource has moved to another server, you may wish to have URLs continue to work for a time on the old server while people update their bookmarks.
Simply add (similar) to the following to your virtual host:

	ServerName www.siteaddress.com
	ServerAlias siteaddress.com
	DocumentRoot /var/www/site
	RewriteEngine on
	RewriteRule ^/blog/(.+) http://blog.siteaddress.com/$1 [R,L]

Leave a Reply

Your email address will not be published. Required fields are marked *