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).
Any help?
Thanks!
As brock Batsell suggested, a solution can be proxying the requests. you’ll usually find this behavior in web apps that use long polling services, like chats, and need to proxy out those services to a second web server to reduce the load on the main one (usually, apache + lighhtpd)
Here is the basic usage (assuming youre using apache, and the other web-server is listening on the 81 port):
Just replace the
localhostand port number with your second server host and port.Please note that even if you dont need to proxy the ftp traffic, in apache the
proxy_ftp_modulemust be enabled as well.