Made Mediawiki rewrite rules work for virtual hosts

Related to cdd1785cd6380e971ad0413e7ecfd3af7ab38625
Merge pull request #3854 from ip1981/master

Made Mediawiki rewrite rules work for virtual hosts