Manual:$wgMainPageIsDomainRoot/en

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

Setting this may incur in some overhead. See.