My host does not know how to fix this. I saw in google results URLs that worry me. For example, I saw rootdomain/addondomain.com/url1.html etc this happened because google bot was not redirected to addondomain.com/url1.html for example
So I want to redirect all URLs to addondomain.com only
Because this created duplicate content. My root domain has nothing to do with addon domain...they have a completely different topic....
I already have redirection from addondomain.rootdomain.com to addon domain in htaccess.... but I want to add the new one too...
This is the code I already have
RewriteCond %{HTTP_HOST} ^addon\.root\.org$ [OR]
RewriteCond %{HTTP_HOST} ^www\.addon\.root\.org$
RewriteRule ^(.*)$ "https\:\/\/www\.addon\.com\/$1" [R=301,L]
here is the example with some random domains...
root domain is : bonesroot.com
addon domain is : beeraddon.com
and beerroot.com files are in the folder bones.com/beer on the server
so I want to create immediate redirection from bonesroot.com/beer to beeraddon.com is that possible or will it affect the server?
this video explains what I want to do https://www.youtube.com/watch?v=cRm6deeeTVY
and here is the code they recommend
RewriteEngine On
RewriteCond %{HTTP_HOST} ^(www.)?domain.com$ [NC]
RewriteCond %{REQUEST_URI} ^/addonfolder/(.*)$
RewriteRule ^(.*)$ - [L,R=404]