Forum Moderators: phranque
I've got an Addon Domain set up in a folder under that one, as /public_html/addondomainfolder/
(That Addon Domain also has subdomains, but I don't know if that matters)
What I would like to achieve is two-fold... In the Addon Domain, I would like to redirect all non-www requests to www...
At the same time, in the primary domain, I'd like to be able to redirect all requests to www.primarydomain.com/addondomainfolder/ AND www.primarydomain.com/addondomainfolder (no slash) back to www.primarydomain.com
I had originally set up my Addon Domain's .htaccess as so:
RewriteEngine on
RewriteCond %{HTTP_HOST}!^www\.addondomain\.com [NC]
RewriteCond %{HTTP_HOST}!^$
RewriteRule ^(.*) http://www.addondomain.com/$1 [R=301]
However, that causes requests to
www.primarydomain.com/addondomainfolder/
to be redirected to www.addondomain.com
and also requests to
www.primarydomain.com/addondomainfolder (no slash)
to be redirected to www.addondomain.com//home/#*$!XX/public_html/addondomainfolder
and throwing a 404 error.
Is it not possible to achieve both of these goals? Ideally I would like to be able to redirect non-www to www for the addon domain, but at the same time be able to redirect www.primary.com/addonfolder/ back to primary.com simply because it masks the existence of the addon domain.
Anyone have any ideas or is this just not doable? The Apache version is 1.3.37 if that helps.
-min.
[edited by: jdMorgan at 4:16 am (utc) on July 21, 2007]
[edit reason] De-linked "addondomain.com" [/edit]