how to configure short URLs on MediaWiki

Auto-Install Applications > MediaWiki
Please follow the steps below to configure short URLs on your Mediawiki site.

1. install mediawiki to sub folder "w"(www.domain.com/w)
2. Edit the appropriate path configurations in your LocalSettings.php file:

$wgScriptPath = "/w";
$wgArticlePath = "/wiki/$1";
$wgUsePathInfo = true;

3. 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="wikiRule1" stopProcessing="true">
<match url="^wiki/(.*)$" />
<action type="Rewrite" url="/w/index.php?title={UrlEncode:{R:1}}" />
</rule>
<rule name="wikiRule2" stopProcessing="true">
<match url="^wiki/$" />
<action type="Rewrite" url="/w/index.php" />
</rule>
<rule name="wikiRule4" stopProcessing="true">
<match url="^/*$" />
<action type="Rewrite" url="/w/index.php" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>

4. Test your Mediawiki site with your domain name.