Documentation:Configuration

From Meta, a Wikimedia project coordination wiki
Jump to: navigation, search
Ambox outdated content.svg

This page is outdated.
Please see Manual:Configuration on MediaWiki.org for more up to date informations.

MediaWiki logo
MediaWiki Handbook: Contents, Readers, Editors, Moderators, System admins, Researchers +/-
Blue Glass Arrow.svg MediaWiki.svg
A proposal to move this page to MediaWiki.org was rejected.
Because the Template:MoveToMediaWiki tag was on the page for a year without any MediaWiki.org importers seeing fit to transwiki it, the move proposal was regarded as rejected by the MediaWiki.org community.


General Considerations[edit]

Everything related to configuring the MediaWiki software is set in the LocalSettings.php file in your wiki's home directory. Apache reads and processes the settings inside the LocalSettings.php script whenever the wiki is accessed.

Near the top of LocalSettings.php is a line that loads the DefaultSettings.php file. The default settings therefore get applied first. Any of these default settings can be overwritten by a similarly named entry in the LocalSettings.php file if the entry appears after the line that loads DefaultSettings.php. Take care when working with arrays.

Beautifying the URL: Enabling the Apache httpd's Rewrite Engine[edit]

Please visit mw:Manual:Short URL

The URLs generated by the MediaWiki software by default are pretty ugly; they are hard to remember and contain characters that might disturb search engines when indexing your site.

Since we are using the Apache httpd, its built-in Rewrite Engine can help. It is called mod_rewrite and is also available in version 2; it's also called "the Swiss Army Knife of URL manipulation". It helps us to construct clean URLs.

This module uses a rule-based rewriting engine (based on a regular-expression parser) to rewrite requested URLs on the fly. It supports an unlimited number of rules and an unlimited number of attached rule conditions for each rule to provide a really flexible and powerful URL manipulation mechanism. The URL manipulations can depend on various tests, for instance server variables, environment variables, HTTP headers, time stamps and even external database lookups in various formats can be used to achieve a really granular URL matching (description from [1]).

Further Information[edit]

For more information about regular expressions either have a look at your local regex(3) manpage or its src/regex/regex.3 copy in the Apache 1.3 distribution. If you are interested in more detailed information about regular expressions and their variants (POSIX regex, Perl regex, etc.) have a look at the following dedicated book on this topic:

Mastering Regular Expressions
Jeffrey E.F. Friedl
Nutshell Handbook Server
O'Reilly & Associates, Inc. 1997
ISBN 1-56592-257-3

For further information and help about this module see also:

Securing your MediaWiki[edit]

Please visit the Security Guide for further information on securing your MediaWiki installation.

Troubleshooting[edit]

Please see mw:Manual:Errors and Symptoms.

Where to go from here[edit]