Welcome Guest, Not a member yet? Register   Sign In
Htaccess confusion
#1

[eluser]Bondie[/eluser]
So, I got confused, basically I have around 10 domains that I'm looking to 301 redirect to one main domain, all setup to the same server.

*replaced domain names obviously Wink*
Code:
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} (www\.)?domainone\.(com|info)$ [NC]
RewriteCond %{HTTP_HOST} (www\.)?domaintwo\.(co.uk)$ [NC]
RewriteCond %{HTTP_HOST} (www\.)?domainthree\.(co.uk)$ [NC]
RewriteCond %{HTTP_HOST} (www\.)?domainfour\.(co.uk)$ [NC]
RewriteCond %{HTTP_HOST} (www\.)?domainfive\.(co.uk)$ [NC]
RewriteCond %{HTTP_HOST} (www\.)?domainsix\.(co.uk)$ [NC]
RewriteCond %{HTTP_HOST} (www\.)?domainseven\.(co.uk)$ [NC]
RewriteRule ^(.*)$ http://www.domainone.co.uk/$1 [R=301,L]

domainone.co.uk is the main domain which I also own domainone.com domainone.info

some of the domains redirect and others don't redirect, I'm not amazing with htaccess, could someone point out what I've obviously done wrong?

Regards,
Jamie


Messages In This Thread
Htaccess confusion - by El Forum - 06-09-2012, 03:10 AM
Htaccess confusion - by El Forum - 06-09-2012, 03:22 AM



Theme © iAndrew 2016 - Forum software by © MyBB