Wikitech:URL layout

From Wikitech
Revision as of 22:51, 16 April 2012 by Krinkle (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

For the curious, here's how the URL layouts on wikitech-old.wikimedia.org are achieved:

In apache config:

Alias /view /var/www/wikitech/view.php
Alias /edit /var/www/wikitech/edit.php
Alias /history /var/www/wikitech/history.php
Alias /submit /var/www/wikitech/submit.php
Alias /delete /var/www/wikitech/delete.php

These scripts are simple wrappers that set $_REQUEST['action'] and pass control on to index.php.

In LocalSettings.php:

$wgArticlePath = '/view/$1';
$wgActionPaths = array(
  'view' => '/view/$1',
  'edit' => '/edit/$1',
  'history' => '/history/$1',
  'delete' => '/delete/$1',
  'submit' => '/submit/$1',
);
Personal tools

Variants
Actions
Navigation
Ops documentation
Wiki
Toolbox