Hi.
I have a site which loads images and scripts from a second domain.
The second domain is simply pointing to the same location as the first domain. So you could see the same site at both domains.
So I want to block users and bots from seeing the duplicate site. I attempted the follow htaccess code, but I really don't full understand how it works.
RewriteCond %{HTTP_HOST} ^images.domain2.com
RewriteRule (.*)$ [
domain1.com...] [R=301,L]
The issue is that this redirects everything, the images and script files being loaded for each page are being redirect back to the main domain.
I would like to be able to just redirect pages ending in html at domain2 to domain one, put keep all other files like scripts and images accessible.
Does any clever htaccess user know how this can be done? or have a better idea of a solution for this?
Thanks very much for your time and help.
Renton