[thelist] URL Rewrite Between Two Doamins

Ron Dorman rwd at csi1st.net
Mon Jun 20 07:58:28 CDT 2005

Maximillian Schwanekamp wrote:

>Ron Dorman wrote:
>>I have a Linux/Apache/php/MySQL platform.
>>I need to have *domainB.com* be able to run *app.domainA.com* and look
>>like it is running *app.domainB.com* in the address bar and all other
>>references to the browser window/object.
>Do you have access to httpd.conf?  If so, you can have app.domainB.com's
>DocumentRoot set to the same as app.domainA.com.  e.g.:
>ServerName app.domainb.com
>ServerAdmin admin at domainb.com
>DocumentRoot /home/domaina/public_html/app
>User domaina
>Group domaina
>That is, for app.domainb.com which resolves to, set
>DocumentRoot to domaina/public_html/app (i.e. domainA.com/app), and run
>with the credentials of user domaina.  This is assuming you already have
>things set up for app.domaina.com and have DNS already configured for
>app.domainb.com to resolve correctly. You might also want to set the
>ErrorLog directive too!  Don't forget to restart or reload Apache when
>you make the change.
>Maybe someone else will have a more elegant solution, but this ought to
>do what you're after...if you have access to httpd.conf.
>If *not*, we'll probably need some more info.  My question in this case
>is whether domainA and domainB are running under different user/groups?
> If domainB has read/execute permissions on domainA's /app directory, a
>mod_rewrite solution could work.
I do have access to httpd.conf. The two domains, A & B, are under 
seperate users/groups at this time, can change if needed. I hadn't 
thought of using httpd.conf and will give it a good test.

Ron D.

More information about the thelist mailing list