Forum Moderators: phranque

Message Too Old, No Replies

.htAccess ReWrite help

         

MrBaseball34

4:47 pm on Dec 14, 2010 (gmt 0)

10+ Year Member



I need info on how to make my site look like it is another site that I own.

I am going to be calling site2 from links on site1 but want the URL to still
show site1 instead of site2 urls.

Let's say that site 1 domain name is
MyCoolWebsite.com

and the site2's domain is
MyOtherCoolWebsite.com

How would I make all pages served by MyOtherCoolWebsite.com show
MyCoolWebsite.com in the URL?

Site2 is actually a CMS with some specific pages that are required by Site1.

g1smd

8:07 pm on Dec 14, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



It depends if the sites are on the same server or not.

Same server: use a Rewrite.

Different server: use as a Proxy.

However, serving the same website content at two URLs is SEO suicide. Consider having only one site listed in search results.

MrBaseball34

11:10 pm on Dec 14, 2010 (gmt 0)

10+ Year Member



They will have different content and be on different servers.
Let's say that user clicks on link on Site1. I want them to think that they are still on Site1 even though I'm serving Site2 content.

Don't ask me why, the customer wants it that way and they don't want to use iFrames as Site2 is a full fledged CMS.

g1smd

11:57 pm on Dec 15, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



The whole idea is a non-starter as described.

The major problem is that internal links will point to the wrong domain.

jdMorgan

4:26 pm on Dec 16, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



This is a typical application of a reverse proxy.

It will require modifications to the server configuration of both servers to correctly and completely implement, and therefore it will require server config access -- a dedicated server or a Virtual Private Server.

Also, all requests for site1 will still pass through the site1 server before being forwarded to the site2 server. Therefore, site1 response time will be longer and reliability will be half. The site2 server will see more load, and therefore, all site2 responses (whether direct or reverse-proxied) will also be slowed.

See Apache mod_proxy for more information on implementing a reverse proxy, and see mod_log_config for information on modifying server2 to properly log site1 requests.

Jim