Just for clarity, I already posted this on StackOverflow and got advice that this better fits in ServerFault.com so here goes:
I know you can redirect subdomains to a different server, but can you do the same with folders?
Say I have example.com. I can redirect mysubdomain.example.com to a different server, but can I redirect example.com/mysubdomain to a different server? I'd like to host a rails app in that folder on a site that runs php while still maintaining good search engines ratings (by not creating a sub domain which in my experience in recognized as a different site).