URL redirects and masking

Discussion in 'Web Design and Development' started by Ol!ver, Mar 31, 2008.

  1. Ol!ver macrumors 6502a

    Joined:
    Mar 2, 2005
    #1
    I've got two domains, the-iblog.com and the-iblog.co.uk. I have the .com forwarded to .co.uk, but I don't want the address bar to reflect this. I want it to still say.com if that's the site the came in on. How would I do this?

    Thanks
     
  2. CoreWeb macrumors 6502

    Joined:
    Mar 2, 2007
    Location:
    Edge of reason
    #2
    You could probably just have both sites point at the same server files (assuming you run them from the same server). Then they'd be two separate sites, but use the same code and database.

    Otherwise it might be tricky, and it would probably be best to allow the redirect to take place.
     
  3. Ol!ver thread starter macrumors 6502a

    Joined:
    Mar 2, 2005
    #3
    There's only one physical site and set of files.
     
  4. CoreWeb macrumors 6502

    Joined:
    Mar 2, 2007
    Location:
    Edge of reason
    #4
    Then you don't, theoretically, need forwarding at all. Just have both domains point to the same IP address, and things should work properly.

    If you are using virtual hosts in Apache, you'll need to add ServerAliases for the alternate domains:

    I think it is something like:
    Code:
    ServerName the-iblog.com
    ServerAlias *.the-iblog.com the-iblog.co.uk *.the-iblog.co.uk
    
    If you are not using virtual hosts, I think it should just work as is...
     
  5. Ol!ver thread starter macrumors 6502a

    Joined:
    Mar 2, 2005
    #5
    How do I point it at a DNS? I've changed the name servers, is there something else?

    Cheers matey.
     

Share This Page