terrorchid Hi all, I want to create subdomains inside my dokuwiki for the user pages. Their start at www.domain.org/wiki:user:username: would become username.domain.org I know that DW's htaccess is a bit of a pickle and webmasters are advised not to tamper with it, so I thought it would be good to have the experts take a look at it. This is what I would add: RewriteCond %{HTTP_HOST} ([a-z_-]*).domain.org$ RewriteRule (.*) $/wiki:user:%1&url=%{HTTP_HOST}%{REQUEST_URI} [L,QSA] first line grabs the subdomain, second line inserts it simple, but would there be a possible issue with the existing DW htaccess ?
andi What's the url= parameter for? Also shouldn't you do a redirect to the main host instead of a internal redirect? Otherwise all wiki links will continue to point to the "user host" but will be rewritten again... hmm just thinking about this causes me a headache. Unless you have a very good reason to do this I'd recommend to abandon that plan.
terrorchid Hi Andy, the url= parameter is something I forgot to remove, please ignore. And yes, I should redirect to the main host. So with that correction, would it still be a bad idea ? regards, Fred
andi Then this might work: RewriteCond %{HTTP_HOST} ([a-z_-]*).domain.org$ RewriteRule (.*) http://domain.org/wiki:user:%1 [R,QSA]