Manual:Short URL/wiki/Page title

From MediaWiki.org

Jump to: navigation, search

1. First, make sure that MediaWiki is not in a directory under the Apache DocumentRoot (the DocumentRoot is usually something like "htdocs"). This step ensures that you don't overlap articles and files.

2. In LocalSettings.php, set the following:

$wgScriptPath = "/w"; # in default installations this line is already present. /w stands for the actual existing folder with the mediawiki-installation.
$wgScript = "$wgScriptPath/index.php";
$wgArticlePath = "/wiki/$1";  # /wiki stands for the desired URL that you wish to use for accessing the mediawiki-content.

3. Set up the following in your Apache httpd.conf:

   <Directory C:/XAMPP/w>                  # Replace the example C:/XAMPP/w/
    Order allow,deny                       # by the actual folder-path.
    Allow from all                         # This is necessary, when the folder is outside
   </Directory>                            # the htdocs-directory, as recommended above.
 
   Alias /w/index.php C:XAMPP/w/index.php  # Replace the example C:/XAMPP/w/
   Alias /wiki C:XAMPP/w/index.php         # by the actual folder-path.
   Alias /index.php C:XAMPP/w/index.php    #

4. Restart Apache.

5. Create a directory "w" under your DocumentRoot and move /path/to/your/MediaWiki/installation/skins to this directory.

Instead of moving your skins directory, you can append this line to your alias for the same effect:

   Alias /w/skins/ C:XAMPP/w/skins/        # Replace C:/XAMPP/w/ as above.

If this still causes 404 errors place it as the first alias.

To Fix the links to any images you have, append this line also:

   Alias /w/images/ C:XAMPP/w/images/      # Replace C:/XAMPP/w/ as above.