Welcome to WebmasterWorld Guest from

Forum Moderators: Ocean10000 & incrediBILL & phranque

Message Too Old, No Replies

How to set catch-all style subdomain on Apache/Win

catch-all style on localhost

3:59 pm on Sep 2, 2005 (gmt 0)

New User

10+ Year Member

joined:June 17, 2005
votes: 0

Just wondering / looking for how to setup a catch-all style for my localhost based on Windows/Apache.
I’ve set up Virtual Host (httpd.conf & windows hosts file) successfully. So I have a “sample.com” that points to sample folder (“rootdir\sample\”).
Now how can catch all of the requests like “*.sample.com” and point them to “rootdir\sample\index.php” to have something dynamic?
I guess I need something like the following in my windows “hosts” file (But * sign doesn’t work): *.something.com

Is there something necessary to my httpd.conf (ServerAlias? How?)? or both of hosts file and conf file?

Any idea will appreciate…

10:31 pm on Sept 2, 2005 (gmt 0)

Senior Member

WebmasterWorld Senior Member jdmorgan is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Mar 31, 2002
votes: 0


It sounds like this current thread [webmasterworld.com] may help you get started.


8:53 am on Sept 3, 2005 (gmt 0)

New User

10+ Year Member

joined:June 17, 2005
votes: 0

Dear Jim,
You're right. Thanks to “Server Alias” Apache has no problem but as you know on localhost (win os), "hosts" file should be set to translate entered domain names, so how should that be? I mean witch character can act like * sign? I tried "*" and even "x" chars like below but neither of them helped! localhost #It's working test.com #It's working too *.test.com # * does not mean "anything" x.test.com # x does not mean "anything" too

Any idea? Maybe a dns server is required?

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members