On Mon, Apr 21, 2008 at 10:04 AM, Hank <[EMAIL PROTECTED]> wrote:
> 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.

If the content is living on the same server as domainA.com (which it
apparently is in this case), then you don't want to proxy. There is no
need to create an additional HTTP request. You just instruct apache to
grab the file directly. So you want something like

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

If this doesn't work, tell us EXACTLY what happens: what do you see in
the browser, error_log, and access_log?

If you still can't figure it out, you'll need to use the RewriteLog.
Since you only have access to .htaccess on the live server, you'll
need to setup a test server where you can manipulate httpd.conf in
order to activate the RewriteLog.

Joshua.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: [EMAIL PROTECTED]
   "   from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to