chestertb
03-15-2007, 08:11 AM
Hi All,
I'm very new to Apache, so please forgive me if the jargon isn't right.
I have a Debian based Apache 2 server, and I want to create pseudo subdomains. As I understand it, this is achieved through an entry in one of the Apache conf files.
For example, lets say we have the domain 'domain.tld'. I want to create 'sub.domain.tld'. The 'real' way to do it takes time to become active, and seems overly complex (even though the control panel I'm using creates it all for me), AND isn't accessible as http://www.sub.domain.tld, only as http://sub.domain.tld.
I read a reference somewhere on the web that talked about 'pseudo' subdomains, which are just Apache redirects to the content of directories within domain root directory (the html folder). Unfortunately, it didn't detail how to do that.
What I'm looking for is a single entry in an Apache .conf file that reads the request 'sub.domain.tld' and simply redirects to domain.tld/sub (while leaving the displayed address as 'sub.domain.tld'). If /sub doesn't exists, an error is generated. As soon as /sub is created, the redirect comes into effect and sub.domain.tld works.
Is this possible?
If so, how do I get it done?
Thanks
CTB
I'm very new to Apache, so please forgive me if the jargon isn't right.
I have a Debian based Apache 2 server, and I want to create pseudo subdomains. As I understand it, this is achieved through an entry in one of the Apache conf files.
For example, lets say we have the domain 'domain.tld'. I want to create 'sub.domain.tld'. The 'real' way to do it takes time to become active, and seems overly complex (even though the control panel I'm using creates it all for me), AND isn't accessible as http://www.sub.domain.tld, only as http://sub.domain.tld.
I read a reference somewhere on the web that talked about 'pseudo' subdomains, which are just Apache redirects to the content of directories within domain root directory (the html folder). Unfortunately, it didn't detail how to do that.
What I'm looking for is a single entry in an Apache .conf file that reads the request 'sub.domain.tld' and simply redirects to domain.tld/sub (while leaving the displayed address as 'sub.domain.tld'). If /sub doesn't exists, an error is generated. As soon as /sub is created, the redirect comes into effect and sub.domain.tld works.
Is this possible?
If so, how do I get it done?
Thanks
CTB