try
RewriteEngine On
RewriteBase /
## SEO REWRITES ###
RewriteRule ^addondomain.co.uk$ http://www.addondomain.co.uk
Hi, can anyone help me with this one:
I have a addon domain and have a htaccess file to control any duplicate content issues but the one I can' work out is within the main domain how do I rewrite/redirect www.maindomain.co.uk/addondomain.co.uk to www.addondomain.co.uk ?
I have tried (which I thought was right)
RewriteEngine OnRedirect /addondomain.co.uk http://www.addondomain.co.uk
The addon domain names folder is addondomain.co.uk
Any help would be really appreciated.
try
RewriteEngine On
RewriteBase /
## SEO REWRITES ###
RewriteRule ^addondomain.co.uk$ http://www.addondomain.co.uk
High Quality Bed Frames From BedFrames.co.uk
bed frames
No that one don't do it :cry
hmm strange should do thats what ive got for mine ...
ok changeCode:RewriteBase http://www.maindomain.co.uk/
High Quality Bed Frames From BedFrames.co.uk
bed frames
Ok just done this and all seems to be working:
Redirect /addondomain.co.uk http://www.addondomain.co.uk
not sure why it wasn't working to start with! just took the 'RewriteEngine On' out as it was already on!
strange lol
High Quality Bed Frames From BedFrames.co.uk
bed frames
Even stranger doesn't work now!! I'm really confused can't access my main site or addon domain!
Update I deleted the htaccess in the main domain and the sites both worked, I then re uploaded the same htaccess and it all works!!! Computers are strange things!
Is there something wrong with doing it this way 'Redirect /addondomain.co.uk http://www.addondomain.co.uk' causing the server to throw a wobbley now and then?
nope just sounds like your apache process being an arse lol
High Quality Bed Frames From BedFrames.co.uk
bed frames
Is this little tutorial i wrote a while ago any help?
Rankwell SEO Htaccess for addon domains
Cheers all, still working fingers crossed
Ash, funnily enough that's the one I used! thanks :tup
The only thing I had to change for some reason is I had to loose the slashes that were escaping the dots in the address then it all worked.
These ones:
Options +FollowSymlinks
RewriteEngine OnRewriteCond %{HTTP_HOST} ^addondomain\.co.uk [NC]
RewriteRule ^(.*) http://www.addondomain.co.uk/$1 [R=301,L]
RewriteCond %{HTTP_HOST} ^www.addondomain.the-hosting-domain\.co.uk
RewriteRule ^(.*)$ http://www.addondomain.co.uk/$1 [R=permanent,L]
RewriteCond %{HTTP_HOST} ^addondomain.the-hosting-domain\.co.uk
RewriteRule ^(.*)$ http://www.addondomain.co.uk/$1 [R=permanent,L]
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks