Manual:$wgScript/en

Details
The URL of index.php, relative to DOCUMENT_ROOT.

is defined relative to $Script. If you redefine this in your then you must also make sure you update.