Mose
Mose

Reputation: 129

Redirect a domain invisibly

I have a customer who wants his domain to be redirected to some other site. For example:

www.hisdomaine.com => www.him.somewysiwyghost.com

the redirection should be transparent so www.hisdomain.com/somefolder should translate to www.him.somesysiwyghost.com/somefolder

important to him is, www.him.somewysiwyghost.com should never be visible to the user. the user should see www.hisdomain.com. because of this frames aren't an option. also frames are not the best options for SEO.

I tried using mod_rewrite for this, using this rule:

RewriteRule (.*) http://www.him.somewysiwyghost.com/$1 [L]

It works fine, except the URI translates to www.him.somewysiwyghost.com so the user could see it. How could I translate invisibly?

Upvotes: 2

Views: 86

Answers (2)

KodeFor.Me
KodeFor.Me

Reputation: 13511

In that case I think you have to transfer the domain on the other server and park it. I don't think that you can do something like that via .htaccess.

Another solution, but not so good is to use a full screen iFrame to display the other site.

Upvotes: 0

3on
3on

Reputation: 6339

You should use mod_proxy as such in a vhost:

<VirtualHost *:80>
    ServerName hisdomaine.com
    ServerAlias www.hisdomaine.com
    ProxyPass / http://www.him.somesysiwyghost.com
    ProxyPassReverse / http://www.him.somesysiwyghost.com
    ProxyPreserveHost On
    <Location />
        Order allow,deny
    Allow from all
    </Location>
</VirtualHost>

Upvotes: 2

Related Questions