I'm trying to add a wildcard sub-domain system to my web server, but its still not working,
These are the steps I took:
I made a new file, vhost.conf
, in the directory
var/www/vhosts/www.example.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 example.com
And then I edited my .htaccess
file:
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTP_HOST} ^(^.*)\.example.com
RewriteRule (.*) user.php?user=%1
Normally my URL would be:
http://www.example.com/user.php?user=solomon
But now, I want it like this:
http://solomon.example.com
But the steps I took still don't work.
:)) What's happening here?