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:

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

Leave a Comment

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