Open main menu

Manual:Short URL/Page title -- Saetta Web Server

Example configuration:

  • Wiki is installed in /w/ directory in the virtual server root directory.
  • You want to access articles as or or

Pretty URLs with Saetta Web ServerEdit

To use pretty URLs with Saetta Web Server a properly configured URL rewriting module written in the C programming language is required.

  1. Download the module
  2. Configure the module
  3. Build the module
  4. Add the URL rewriting module to the server software
  5. Restart the web server or reload its configuration
  6. Edit the LocalSettings.php file

Download the moduleEdit

Direct download link to the source code of the module.

Configure the moduleEdit

Optionally edit the file mediawiki.c to change the default paths.

Search for the WIKIMEDIA_ORIGINAL define:


Replace the path /w/ with the path to the real files on your server.

Everything placed in /w/* will be accessed directly. For example, a file placed in "/w/images/" can be accessed because the redirection module won't be active in "/w/" and after "/w/".

Permanent links of mediawiki will point to


If the exceptions haven't been changed only the following addresses won't be rewritten:

http://host/WIKIMEDIA_ORIGINAL (from the first level on = "/w/*")

Build the moduleEdit

Build the module using the GNU C compiler:

gcc -Wall -shared -O3 -s -fPIC -o -DWIKIMEDIA_ROOT mediawiki.c

WIKIMEDIA_ROOT should be defined at compiling time in order to turn on a special configuration for the module.

Add the URL rewriting module to the server softwareEdit

Upload the module to the server if compiled off site, and then add it to the XML configuration file of your server:

   <website host=":80"><!-- catch all hostname -->
           <urlrewriter enabled="1" path="" entrypoint="saetta_main" />
   <website host=""><!-- or just for: -->
           <urlrewriter enabled="1" path="" entrypoint="saetta_main" />

Set as path, the full or the relative path to the compiled module.

Restart the web serverEdit

Start or restart the web server.

Edit the LocalSettings.php fileEdit

Edit LocalSettings.php and add the following:

$wgArticlePath      = "/$1";
$wgUsePathInfo      = true;
  • That's all