Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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.

share|improve this question

1 Answer 1

up vote 4 down vote accepted

you can use ProxyPass:

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

here is the apache documentation for more details.

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

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.