I have been on here since last night. I have tried info from dozens of sites and rewritten this over 100 times (I know cause that's when my editor's undo ends) and NOTHING is working.
I have tried adding the htaccess to the main domains and I have tried it in the addons still not right
I would like some, NOT ALL, Add on domains to go (rewrite) to the main site but still retain the add on domain url in address bar (not redirect).
This is what I have tried
In root
This one send all add ons to main But does not retain add on url
RewriteCond %{HTTP_HOST} !^www\.main\.com
RewriteRule ^(.*) http://www.main.com%{REQUEST_URI} [L]
tried it with [P] get Not Found The requested URL / was not found on this server.
this one gives me 403 forbidden
RewriteCond %{HTTP_HOST} !^www\.main\.com
RewriteRule ^(.*) /%1 [P]
This one changes nothing addon1.com still goes to addon1.com
RewriteCond %{HTTP_HOST} ^www\.addon1\.com
RewriteCond $1 !^addon1/
RewriteRule ^(.*)$ /$1 [L]
This just gives me 500 error though I got from a site that says it works
RewriteCond %{HTTP_HOST} ^(www\.)?addon1\.com/(.*)$ [NC, OR]
RewriteCond %{HTTP_HOST} ^(www\.)?addon1\.main\.com/(.*)$ [NC,OR]
RewriteCond %{REQUEST_URI} ^/addon1($|/.*$) [NC]
RewriteRule ^.* http://main.com/%1
Tried variations of % $ .* (.*), [L] no L, [P], Or no or ...
......................
Can someone tell what is wrong please?
-edit-
I have rewrite on
<IfModule mod_rewrite.c>
Options +FollowSymLinks
RewriteEngine On
CODE HERE
</IfModule>
-edit-
ALSO I have 100 domains so I would REALLY like one htaccess to control them all and not have to write one for EACH domain.
Any suggestions on how to make the rewrite so I don't get banned from SE I read somewhere about adding nofollow or something to the addons
Thanks