Wiki+

RewriteEngine On

  1. --- Canonicalize: force lowercase /w/ instead of /W/ ---

RewriteRule ^W/(.*)$ /w/$1 [R=301,L]

  1. --- Short URLs for PmWiki ---
  2. Home page

RewriteRule ^$ pmwiki.php [L,QSA]

  1. /w -> W.HomePage

RewriteRule ^w/?$ pmwiki.php?n=W.HomePage [L,QSA]

  1. /w/Index -> redirect to site root (your "main page")

RewriteRule ^w/Index/?$ / [R=301,L]

  1. /w/PageName -> W.PageName

RewriteRule ^w/([^/]+)/?$ pmwiki.php?n=W.$1 [L,QSA]

  1. (Optional) if you want /w/Group/PageName to work too, pass through directly:
  2. RewriteRule ^w/([^/]+)/([^/]+)/?$ pmwiki.php?n=$1.$2 [L,QSA]
  3. If PmWiki is in a subdir, add: RewriteBase /that/subdir/