4

How can I have a sub-directory under a domain point to another server? For example, example.com/myscript/ should load the script located on a different server than example.com. This can be achieved by using a sub-domain, but I need to avoid that.

  • example.com should load from server 1.

  • example.com/myscript/ should load from server 2.

I am using Apache.

1 Answer 1

6

you can use ProxyPass:

ProxyPass /myscript http://server2/myscript
ProxyPassReverse /myscript http://server2/myscript

here is the apache documentation for more details.

3
  • Thanks, will this be SEO friendly and completely transparent to user ?
    – iTech
    Mar 1, 2010 at 8:17
  • i can't answer it for seo, but it is transparent to the user.
    – Christian
    Mar 1, 2010 at 9:16
  • @itech, yes totally SEO friendly Jul 28, 2010 at 5:19

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .