Hi-
I'm having a problem figuring out the exact syntax I need to use with apache and rewrite. Here is my scenario. I have two domains registered, and the "parked" one points to my main site. I recently found some people are linking to my parked domain. Further, the parked domain is setup so that is does not currently return a "301 permanent redirect." Instead, it returns a "200" header response, but the actual page from my main site. Thus, it appears as an exact duplicate of my main site. I'd like to fix this to get credit for the backlinks on my main domain, and also to insure I do not get penalized for having 2 sites with the exact same content.
Rather than rely on my hosting company to fix this problem, I decided it would be better for me to just create the proper rules in my .htaccess file. So, here is what I have now:
RewriteEngine on
RewriteCond %{HTTP_HOST} ^www.myparkeddomain.com$
RewriteRule ^(.*)$ http://www.mymaindomain.com/$1 [R=301]
This works for http. However, when someone tries to buy something on
www.mymaindomain.com, they are sent to a completely different server, and the checkout page includes secure image links from my main domain, which uses a shared certificate. So, on the checkout page, you would find a reference like:
When I have the above htaccess file in place, none of the images appear on the checkout page. If I remove the .htaccess file, the images appear.
Any ideas on how to fix? Thanks,
Bill