dynamic subdomains problem?

Posted by Solomon Saleh on Server Fault See other posts from Server Fault or by Solomon Saleh
Published on 2010-12-30T21:58:07Z Indexed on 2010/12/30 22:55 UTC
Read the original article Hit count: 403

Filed under:
|
|
|
|

im trying to add a wildcard subdomain system to my webserver, but its still not working,

this is the steps i took:

i made a new file vhost.conf in the directory var/www/vhosts/www.kornar.com/conf/vhost.conf

and i put

ServerAlias *.domain.com 

then second of all i made a new dns wildcard on plesk

CNAME *.domain.com kornar.com

and then i edited my .htaccess file

Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTP_HOST} ^(^.*)\.kornar.com
RewriteRule (.*)  user.php?user=%1

normally my url would be

http://www.kornar.com/user.php?user=solomon

but now i want to like this

http://solomon.kornar.com

but the steps i took still deosnt work

:)) whats happening here

© Server Fault or respective owner

Related posts about apache

Related posts about php