Manual:Short URL/wiki/Page title -- Cherokee rewrite--root access

From mediawiki.org

Example configuration:

  • wiki is installed in /w/ directory in the virtual server root directory.
  • you want to avoid index.php
  • you want to access articles as /wiki/Article


Steps:

  1. Access cherokee-admin interface
  2. Go to Virtual servers section and choose the virtual server you want to edit
  3. Open Behavior tab
  4. Click Add new rule and choose type Regular Expression, then write /wiki/(.+) inside the Regular expression field
  5. Press enter, open Handler tab and choose type Redirection
  6. Add a new rule with the following settings:
    • Show: Internal
    • Regular expression: (leave blank)
    • Substitution: /w/index.php?/$1
  7. Press enter to accept and go again to the Behavior tab inside your wiki's virtual server
  8. Click Add new rule and choose type Full Path, then write /wiki inside the Full Path field
  9. Press enter and, in Add another path write /wiki/
  10. Open Handler tab and choose type Redirection
  11. Add a new rule with the following settings:
    • Show: External
    • Regular expression: (leave blank)
    • Substitution: /w/index.php
  12. Press enter to accept and restart the server
  13. Edit LocalSettings.php and add the following:
$wgScriptPath	    = "/w";
$wgScript           = "$wgScriptPath/index.php";
$wgRedirectScript   = "$wgScriptPath/redirect.php";
$wgArticlePath      = "/wiki/$1";
$wgUsePathInfo      = true;


That's all