Manual:$wgUploadMissingFileUrl

Usage
Use this setting to point wikilinks to missing files ("red file links") to a custom URL, as with $wgUploadNavigationUrl. The URL will get  appended to it as appropriate.

If false, the value of $wgUploadNavigationUrl is used. If that too is false, Special:Upload is used.

$wgUploadNavigationUrl was used before this setting (1.16 and below), and will be used if $wgUploadMissingFileUrl is not defined (from  onwards). For 1.17 and 1.18 you have to set $wgUploadMissingFileUrl.