n Mon, Apr 21, 2008 at 3:04 AM, Boyle Owen <[EMAIL PROTECTED]> wrote:

>    ------------------------------
>  understand you correctly, you have registered domainA and domainB and the
> domain names point to your server's IP in DNS. You want to map domainA to
> ../siteA and domainB to ../siteB. You don't have access to the server's
> httpd.conf directly and only have access to .htaccess files.
>
>  Owen,
>
  Thanks for your response.. yes, that is exactly what I want to do, and
yes, I meant proxying the requests and not redirecting them -- thanks for
the clarification.

 I've tried many combinations of the following, which I can get to work as a
re-direct, but never a proxy:

RewriteCond  %{HTTP_HOST}   ^domainA.com$
RewriteRule   ^(.*)$  http://basedomain.com/siteA/$1   [P]
WIth a [P] option, I get a 404 error.  With a [L] option, I get a redirect
but the domain changes to basedomain.com/siteA and not domainA.com/.

I've tried

RewriteCond  %{HTTP_HOST}   ^domainA.com$
RewriteRule   ^(.*)$  /home/user/public_html/siteA/$1  [P]

with both [L] and [P] and it still won't work like I want it to.

I guess I'm surprised I can't get mod_rewrite to silently proxy a call to
domainA.com to basedomain.com/siteA .  I'll guess I'll write a little PHP
script to do it for me if I can't get mod_rewrite to do it for me.

thanks,

-Hank

Reply via email to