4
|
You can't make dynamic subdomains with
.htacces
You will need to configure the apache virtual host to accept requests for multiple domains
Adding the wildcard subdomain
*.example.com , your PHP application will receiveall requests for any domain below example.com , ie garbage.example.com , busted.example.com ,llama.example.com , etc.
At this point, your application will have to determine the validity of the subdomain and
display the appropriate error for unknown subs.
From there, parse the domain for
mike . |
2
|
Wildcard sub-domains are definitely possible using Apache virtual hosts.
I had basically the same requirements and managed to get it working with Apache's
mod_vhost_alias.so module. Try this in your http-vhosts.conf file:
Note that I haven't tested this, but it's pretty close to the solution that worked for me.
Full details of my solution are here: http://www.calcatraz.com/blog/wildcard-subdomains-in-apache-1422
|
No comments:
Post a Comment