You can not add a subdomain via the
You need to modify the vHost configuration and/or add one more vHost.
Have a look at the documentation of your webserver to see how to do this.
There is a logical reason behind this (I don't know all webservers and their features, so correct me if I say something wrong):
Let's look at a typical HTTP request (sent by the client):
GET /index.php HTTP/1.1
So, we have the following information in this request:
- the uri:
- the protocol version we understand:
- the Host (vhost) we want the uri from
On such a request, the webserver does a few lookups:
Host: first the server needs to know in which directory he should look, this is part of the vHost configuration
- the uri you are looking for
.htaccess file belongs to a vHost (eg.
a.example.org), we are dependent on the vHost having already been decided.