RewriteEngine On
- --- Canonicalize: force lowercase /w/ instead of /W/ ---
RewriteRule ^W/(.*)$ /w/$1 [R=301,L]
- --- Short URLs for PmWiki ---
- Home page
RewriteRule ^$ pmwiki.php [L,QSA]
- /w -> W.HomePage
RewriteRule ^w/?$ pmwiki.php?n=W.HomePage [L,QSA]
- /w/Index -> redirect to site root (your "main page")
RewriteRule ^w/Index/?$ / [R=301,L]
- /w/PageName -> W.PageName
RewriteRule ^w/([^/]+)/?$ pmwiki.php?n=W.$1 [L,QSA]
- (Optional) if you want /w/Group/PageName to work too, pass through directly:
- RewriteRule ^w/([^/]+)/([^/]+)/?$ pmwiki.php?n=$1.$2 [L,QSA]
- If PmWiki is in a subdir, add: RewriteBase /that/subdir/