Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New Coder
    Join Date
    Nov 2002
    Location
    PA
    Posts
    20
    Thanks
    0
    Thanked 0 Times in 0 Posts

    2 domains. 1 directory

    I have 2 domain names pointing to the same directory on my server (I want both pages to be updated at the same time but with different databases...its a long story). Is it possible for an ASP page to look to see which url was typed into the browser and direct it to its proper folder?

    if www.page1.com is the url it needs to go to page1.html

    if www.page2.com is the url it needs to go to page2.html


    Thanks.
    Howdy, y'all.

  • #2
    raf
    raf is offline
    Master Coder
    Join Date
    Jul 2002
    Posts
    6,589
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I think you can get the url with this servervariable:

    Request.ServerVariables("SERVER_NAME")
    or
    Request.ServerVariables("URL")


    and then you can redirect, depending on the url. This code then need to be inside your index.asp.

  • #3
    New Coder
    Join Date
    Nov 2002
    Location
    PA
    Posts
    20
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks. I got it.
    Howdy, y'all.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •