Manual:$wgUsePathInfo

Details
Whether to use 'pretty' URLs (or short>Special:MyLanguage/Manual:Short URL|Short URL), e.g.  

Override this to false if  contains unexpectedly incorrect garbage, or to true if it is really correct. It's highly recommended to set its value in LocalSettings.php to prevent inconsistencies between web requests and scripts run from the command line, where the value may change between them.