|
Profiles /
RRipleyProvided stuff for
Well, I'm using the variant .htaccess and pmwiki.php in the Same Directory. I then needed a solution to access my wiki by http://example.com/in/this/subdir/
and http://subdomain.example.com/
pointing to the same wiki. Here's the result (for Apache 2.2 and later):
RewriteEngine On
# No RewriteBase since we Base ourselves
RewriteCond %{HTTP_HOST} ^subdomain\.example\.com$ [NC]
RewriteRule .? - [E=REWRITEBASE:/]
RewriteCond %{HTTP_HOST} ^(www\.)?example\.com$ [NC]
RewriteRule .? - [E=REWRITEBASE:/in/this/subdir/]
# more RewriteCond-RewriteRule pairs may follow further hostnames
RewriteRule ^$ %{ENV:REWRITEBASE}pmwiki.php [L]
RewriteRule ^index\.php$ %{ENV:REWRITEBASE}pmwiki.php [L]
RewriteRule ^([A-Z0-9\xa0-\xff].*)$ %{ENV:REWRITEBASE}pmwiki.php?n=$1 [QSA,L]
First of all, So, a Once the environment variable is set, it prepends each SetVar REWRITEBASE /
since the RRipley 2011-09-16 10:30pm UTC |