Forum Moderators: phranque

Message Too Old, No Replies

Add on Domain to Main (root) domain

         

amommy

11:37 pm on Mar 7, 2011 (gmt 0)

10+ Year Member



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

jdMorgan

6:53 pm on Mar 9, 2011 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



With many/most "Control Panel add-on domains" the domain is added into a a newly-created subdirectory below the "main" domain's directory. The mapping of the add-on to the subdirectory is done using a DocumentRoot "coded" into the server config by the control panel script, and therefore, the main domain's .htaccess file IS NOT processed for add-on domain requests.

The use of "100 domains" is primarily an SEO question, and would perhaps better be addressed to the search-engine-specific forums here. However, unless each of these 100 domains has unique content on it, I do not see a reason to pay for, nurture, and encourage 99 additional competitors to your own site... Rather shooting yourself in the foot in many cases, minor keyword-in-domain benefits notwithstanding. Think big and think "branding." It's easier to make one big site beat 100 smaller ones in terms of links and "mind-share."

Jim

amommy

11:38 pm on Mar 11, 2011 (gmt 0)

10+ Year Member



Thanks for your reply. I figured since I got no replies in 2 days it was a difficult thing to do . I can create condt and rules for pointed domains I have added so I guess I will need to change the addons I want to pointed instead. I thought if I could do the opposite (main domain to addon) and have one addon (in addon1 subdirect) point to another addon (in addon2 sub) it could be possible.
Thanks again.