homepage Welcome to WebmasterWorld Guest from 54.161.214.221
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / Apache Web Server
Forum Library, Charter, Moderators: Ocean10000 & incrediBILL & phranque

Apache Web Server Forum

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




msg:1502359
 3:59 pm on Sep 2, 2005 (gmt 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):

127.0.0.1 *.something.com

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

Any idea will appreciate…

 

jdMorgan




msg:1502360
 10:31 pm on Sep 2, 2005 (gmt 0)

webvand,

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

Jim

webvand




msg:1502361
 8:53 am on Sep 3, 2005 (gmt 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!

127.0.0.1 localhost #It's working
127.0.0.1 test.com #It's working too
127.0.0.1 *.test.com # * does not mean "anything"
127.0.0.1 x.test.com # x does not mean "anything" too

Any idea? Maybe a dns server is required?

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / Apache Web Server
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved