Manual:$wgMainPageIsDomainRoot/fi

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. Katso.