WEB redirect across domains?

Discussion in 'OT Technology' started by White Stormy, Oct 23, 2008.

  1. White Stormy

    White Stormy Take that, subspace!

    Joined:
    Sep 17, 2002
    Messages:
    85,489
    Likes Received:
    70
    Location:
    Sparkopolis
    I need site1 to redirect to site2 without the URL in the address bar changing from site1's address.

    site1 and site2 are on different hosts.

    I can change the .htaccess on both.. I just can't figure out how to do this, if it's possible.

    I put
    Code:
    RewriteRule ^(.*)$ http://site2.com/index.php?q=$1 [L,QSA]
    
    into the .htaccess on site1, and that forwards it fine, but it changes the URL in the address bar.

    is this possible?
     
  2. crazybenf

    crazybenf Active Member

    Joined:
    Nov 14, 2001
    Messages:
    15,575
    Likes Received:
    2
    is it for a few pages, or a whole site? If just a few pages, do a remote include.
     
  3. Jesse

    Jesse PSN: iamajesse; XBL: Inhale My Rod; G8 GT crew; Ne OT Supporter

    Joined:
    Jan 12, 2005
    Messages:
    25,649
    Likes Received:
    0
    Location:
    California :: (925)
    Only way I could think to do it as well. But depending on the host, you may not be able to include across-domain. Even if they are on the same host. (security reasons)
     
  4. White Stormy

    White Stormy Take that, subspace!

    Joined:
    Sep 17, 2002
    Messages:
    85,489
    Likes Received:
    70
    Location:
    Sparkopolis
    alright, thanks guys

    I did a site for my uncle's company, but their current host blows and it wouldn't even run the 'index.php'

    I'll just tell them they need to go ahead and find a new host.
     
  5. Jesse

    Jesse PSN: iamajesse; XBL: Inhale My Rod; G8 GT crew; Ne OT Supporter

    Joined:
    Jan 12, 2005
    Messages:
    25,649
    Likes Received:
    0
    Location:
    California :: (925)
    imountain ;)
     

Share This Page