Forum Moderators: phranque
RewriteRule ^site1/(.*)$ /wikis/index.php?title=$1 [PT,L,QSA]
RewriteRule ^site1/*$ site1/ [L,QSA]
RewriteRule ^site1w/(.*)$ /wikis/$1 [PT,L,QSA]
It is likely that nothing will ever match the second rule, as the first rule will already match the request.
RewriteRule ^test/(.*)$ /wikis/index.php?title=$1 [PT,L,QSA]
RewriteRule ^test/*$ test/ [L,QSA]
RewriteRule ^testw/(.*)$ /wikis/$1 [PT,L,QSA]
[edited by: jdMorgan at 1:13 pm (utc) on Mar 23, 2010]
[edit reason] Please see TOS and Apache Forum Charter [/edit]
# Declare "index.php" as directory index page
DirectoryIndex /index.php
#
# Bypass two following internal rewrite rules for infrastructure
# files and known css, script, and media filetypes
RewriteCond $1 ^(index\.php|robots\.txt|sitemap\.xml)$ [OR]
RewriteCond $1 \.(gif|jpe?g|png|css|js|ico|swf|flv|wmv|mp3|pdf|doc)$
RewriteRule ^(.+\.[a-z0-9]+)$ - [S=2]
#
# Rewrite /test/<whatever> URL requests to /wikis/index.php?title=<whatever>,
# retaining any existing client-requested query parameters.
RewriteRule ^test/(.*)$ /wikis/index.php?title=$1 [QSA,L]
#
# Rewrite /testw/<whatever> URL requests to /wikis/<whatever>
RewriteRule ^testw/(.*)$ /wikis/$1 [L]
RewriteRule ^sites/(.*)$ /sites/wikis/index.php?title=$1 [PT,L,QSA]
RewriteRule ^sites/(.*)w$ /wikis/$1 [PT,L,QSA]