Computing.Net > Forums > Web Development > Host headers on index page

Host headers on index page

Reply to Message Icon

Original Message
Name: jefro
Date: June 16, 2006 at 14:00:03 Pacific
Subject: Host headers on index page
OS: xp pro
CPU/Ram: athlon
Model/Manufacturer: homemade
Comment:

I swear I used to know how to make a single ip:port run multiple web pages using an initial web page that had host header info. Is that wrong? All I can find is how to get IIS or Apache to run host headers, not an index or default page. My wife has a web page and I was going to put up another page for her pal. Thought I could make a simple index page that would then select the correct page using the host header sent information.

I'm sure this is too easy of a question, dunno why I can't seem to find the answer.

Thanks.


Report Offensive Message For Removal

Response Number 1
Name: StreamLogic
Date: August 6, 2006 at 15:50:32 Pacific
Subject: Host headers on index page
Reply: (edit)

Jefro,

You can eaily do this with IIS as you have seen. However, if you are using ASP or some other server-side language, you can also interrogate the HTTP header information. In classic ASP this is accomplished through the Request.ServerVariables() collection. One you find the information which lets you know which site to go to, you can simply redirect to the appropriate landing page.

I hope this helps point you in the right direction.


Curtis Hughes
StreamLogic Inc.
http://www.streamlogicinc.com


Report Offensive Follow Up For Removal







Use following form to reply to current message:

   Name: From My Computing.Net Settings
 E-Mail: From My Computing.Net Settings

Subject: Host headers on index page

Comments:

 


  Homepage URL (*): 
Homepage Title (*): 
         Image URL: 
 
Data Recovery Software