Manual:$wgMainPageIsDomainRoot

If true, users visiting your wiki's main page from the domain roowill not be redirected. This setting requires that short URLs be configured in order to be functional.

Setting this may incur in some overhead. See.