username.domain.com/file rewrite to
domain.com/q.php?user=username&url=file
how do that?
Thanks. Sorry for my English.
username.domain.com/file rewrite to
domain.com/q.php?user=username&url=file
how do that?
Thanks. Sorry for my English.
Try this rule:
RewriteCond %{HTTP_HOST} ^([^./]+)\.example\.com$
RewriteCond %1 !=www
RewriteRule .+ http://example.com/q.php?username=%1&file=$0 [L,QSA]