Please follow the steps below to configure short URLs on your Mediawiki site.
1. Edit the appropriate path configurations in your LocalSettings.php file:
$wgScriptPath = "";
$wgScriptExtension = ".php";
$wgArticlePath = "{$wgScriptPath}/$1";
$wgUsePathInfo = true;
2. put below URL rewrite rules to web.config under your domain root folder
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="MediaWiki Routes" stopProcessing="true">
<match url=".*" ignoreCase="false" />
<conditions>
<add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" />
</conditions>
<action type="Rewrite" url="/index.php" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>
3. Test your Mediawiki site with your domain name.
Article ID: 368, Created: March 20, 2013 at 10:12 PM, Modified: August 6, 2022 at 7:55 PM