formating question

  • Thread starter Thread starter GMW
  • Start date Start date
G

GMW

This will ramble off target a bit but it is relevant. I
have a FP based domain I am reworking. I would like to
set up a redirect so that instead of typing in
northampton1.com/home.htm the user can type in
home.northampton1.com.

Can I do this with a javascript or asp page?
 
No. This is something that is actually done through a domain server in order
to set up the second level domains (the www, home, etc. that tack onto the
beginning). You then have to have your default document on the site detect
which URL the user is coming in from and redirect them to the page you want
(assuiming that home.htm is not the default page as default.htm usually is
for Win based servers). ASP will work fine for this. You just need to grab
the appropriate server variable (request.servervariables("SERVER_NAME")) and
then you can use an if or a case statement to determine which site it
matches, and then which place to redirect it to using a response.redirect -
such as

Dim Host
Host = lcase(request.servervariables("SERVER_NAME")

SELECT CASE Host

CASE "home.mysite.com"
Response.Redirect("home.htm")
CASE ELSE
Response.Redirect("Default.htm")

Hope this helps,
Mark Fitzpatrick
Microsoft MVP - FrontPage

END SELECT

Hope this helps,
Mark Fitzpatrick
Microsoft MVP - FrontPage
 
Back
Top