Domain Redirect Keeping Original url

Discussion in 'Apache' started by z0ro, Oct 28, 2009.

  1. #1
    Hi,
    my question might be a duplicate but other threads still don't have a satisfiable solution:

    I have an add on domain http://www.addonexample.com
    I want to redirect this domain to my main host domain http://www.mainhostexample.com but when a user visits http://www.addonexample.com i want the url to stay in the browser bar.

    here's what i have in my .htaccess file and it's taking care of the redirect but still the http://www.addonexample.com url is changed to http://www.mainhostexample.com upon redirecting :
    
    RewriteEngine on
    RewriteCond %{HTTP_HOST} ^addonexample.com $ [OR]
    RewriteCond %{HTTP_HOST} ^www.addonexample.com $
    RewriteRule ^/?$ "http\:\/\/www\.mainhostexample\.com" [R=301,L]
    
    Code (markup):
    How can that be done?
     
    z0ro, Oct 28, 2009 IP
  2. z0ro

    z0ro Peon

    Messages:
    15
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    what i concluded from those two posts is that the only way to do it is through html frameset or through PHP to proxy the other site's content. frameset is not a good idea for me so how does proxying other site's content through php works?
     
    z0ro, Oct 28, 2009 IP