Subdomains purely by htaccess, not by wildcard dns. Possible? |
[eluser]codex[/eluser]
Hello, I was wondering if it's possible to add the functionality of subdomains by manipulating the htaccess, or does the server has to have wildcard dns?
[eluser]bradym[/eluser]
For subdomains to work, you must have them setup in DNS. Once you've setup a wildcard dns entry, setting up a new subdomain is simple as adding a new virtualhost entry. Also, vhosts can't be setup in .htaccess - they need to be in httpd.conf (or a file included by httpd.conf). http://httpd.apache.org/docs/2.0/vhosts/examples.html
[eluser]codex[/eluser]
That's what I thought, adding a *.domain.com a-record (right?). I hoped it would be possible using just an htaccess. Guess not. Thanks!
[eluser]bradym[/eluser]
Yep, *.domain.com a record should take care of it for you. |
Welcome Guest, Not a member yet? Register Sign In |