Welcome Guest, Not a member yet? Register   Sign In
Subdomains purely by htaccess, not by wildcard dns. Possible?
#1

[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?
#2

[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
#3

[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!
#4

[eluser]bradym[/eluser]
Yep, *.domain.com a record should take care of it for you.




Theme © iAndrew 2016 - Forum software by © MyBB