Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

i have this url

i want to convert this into

how can i do this!! thanks :))

p.s. im using plesk

share|improve this question
up vote 3 down vote accepted

I'm not familiar with Plesk's capabilities, but on a LAMP server, you need to use Apache's mod_rewrite module and have a wildcard DNS setup for * through your DNS provider (either your registrar or your hosting provider).

Your .htaccess for your virtual host will look like this:

  Options +FollowSymLinks
  RewriteEngine On
  RewriteBase /
  RewriteCond %{HTTP_HOST} !$ [NC]
  RewriteCond %{HTTP_HOST} ^(www.)?([a-z0-9-]+) [NC]
  RewriteRule (.*) user.php?user=%2 [NC,QSA]
share|improve this answer
thanks,i have root access, how can i set a wildcard DNS thanks :)) – Solomon Saleh Dec 30 '10 at 18:43
Setting up a wildcard DNS for (* has to be done by whomever controls your DNS records. i.e. in your WHOIS record for, the nameserver records point to the DNS server(s) that control your DNS zone; this is likely the same place where you registered your domain (,, etc.). – gravyface Dec 30 '10 at 18:48

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.