Problems with wildcard subdomains

TijmenNL

New member
Joined
Sep 30, 2005
Messages
4
I'm trying to add a wildcard subdomain redirection.
So that blabla.domain.com goes to www.domain.com/index.php?var=blabla
I already added a DNS record that sends all subdomain request to my IP.
And i have this htaccess file:

RewriteEngine on
RewriteBase /
RewriteCond %{HTTP_HOST} !^www\.domain\.com$
RewriteCond %{HTTP_HOST} !^$
RewriteRule ^(.*) http://www.domain.com/$1 [R=301,L]

But when I try it gives this error:

This IP is being shared among many domains.
To view the domain you are looking for, simply enter the domain name in the location bar of your web browser.

What's wrong?
 
Back
Top