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.a 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    #

3.b Or in more recent versions of Apache look for:

   ScriptAlias /cgi-bin/

and add below

   ScriptAlias /w/index.php C:/xampp/w/index.php  # Replace the example C:/xampp/w/
   ScriptAlias /wiki C:/xampp/w/index.php         # by the actual folder-path.
   ScriptAlias /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.
Personal tools
Namespaces

Variants
Actions
Navigation
Support
Download
Development
Communication
Print/export
Toolbox