1

So here's the scenario:

The domain I have is www.abc.com and I want to point it to (which belongs to another company).

Question: How would I use .htaccess to forward and mask the url so that it stays as www.abc.com? In terms of security, is there any point in buying a digital certificate for www.abc.com?

Ray
  • 3,409
  • 8
  • 33
  • 40

2 Answers2

2

You could uh, run it through a proxy, which will TOTALLY mask it.

You put this in your httpd.conf file, not the .htaccess:

<VirtualHost *:80>
    ServerName www.abc.com
    ServerAlias abc.com
    ProxyRequests     Off
    ProxyPreserveHost On
  <Proxy *>
    Order deny,allow
    Allow from all
  </Proxy>
    ProxyPass / http://site-you-want-2-show.com:80/
    ProxyPassReverse / http://site-you-want-2-show.com:80/
  <Location />
    Allow from all
  </Location>
</VirtualHost>

You can try with ProxyPreserveHost both On and Off, and testing if the images display properly and the addresses of objects show your domain instead.

WARNING: This is not legal if you do not have explicit permission from the company you are trying to show's website. Perhaps you can then just make your homepage an iFrame.

As for certificates: It can be done, see here: http://ssl-proxy.plz.re (short-url)

ionFish
  • 1,004
  • 1
  • 8
  • 20
0

.htaccess files cannot "mask" a domain but could use a reverse proxy if the module is installed.

In most case, the "masked" website will refer to full urls and the "mask" will not work for long.

See what @mesh proposed.

Martin Samson
  • 3,970
  • 21
  • 25