Hi,
I would like to do the following but just cant work out it.
I have domain.com and domain.co.uk
domain.com is the main site, and domain.co.uk hosts images which load in domain.com
I want domain.co.uk to point to domain.com if anyone vist, but this is redirecting all requests to .co.uk to .com. So all the images in .com are being redirect from .co.uk to .com.
images are in subdirectories of domain.co.uk/components and domain.co.uk/images
So i tried this and many variasions, but it just keep redirecting everything.
#if requesting access to domain.co.uk root
RewriteCond %{HTTP_HOST} .domain\.co\.uk$ [NC]
#and not requesting access to componets or image directory or their subdirectories
RewriteCond %{HTTP_HOST} !.domain\.co\.uk/(components|images/.*)
#redirect to .com
RewriteRule (.*)$ [
domain.com...] [R=301,L]
Can anyone please help me to get this working?
thanks