added virtual host based rewrites examples

Made some changes so virtual host based rewrites are possible as a part of the configuration.
Also added some default rewrites for magento and the example app.