Forum Discussion
iRule/Reverse Proxy configuration
Guys, I am trying to configure something in an iRule that will enable me to send a specific URL to a cloud server, but only for a blog site. For instance:
We have a customer that wants to be able to go to www2.janedoe.com/en-us/blog/**topqartile**. When they get to topquartile directory (it’s a blog), they want to pull the content from a cloud server. Basically when they click a link to go to th blog, it sends them to a cloud server, but the URL doesn't change. I am not even sure this is possible, but everything I find on the internet suggests that it is via a reverse proxy server/F5.
I dont even know where to start so any infomation would be greatly appreciated.
Thanks,
B
4 Replies
- BKA_201457
Nimbostratus
"As for old links and typing in the current “direct” URLs, if you type in we will have a redirect to www2.johndoe.com/en-us/blog/top-quartile/. That page will be the same page maintained in WordPress that exists on janedoe.com but mirrored to the new URL. If you click a link to an article on one of the blogs on its original domain, that will redirect to its URL under the new www2 format as well." Does this make sense? Is it possible?
- Henrik_Gyllkran
Nimbostratus
To send a specific URL to another server is a piece of cake with an iRule, create a separate pool where the member is the cloud server and then use something like this:
when HTTP_REQUEST { if { [HTTP::uri] starts_with "/en-us/blog/top-quartile" }{ pool cloud-server-pool } }SNAT is going to be important as well, so either use SNAT on the Virtual Server for all traffic or you could enable SNAT in above iRule if only that traffic should be SNAT:ed.
- BKA_201457
Nimbostratus
Thanks Henrik. I think this solution would work great, but the customer just informed me that the server has several sites on it, and we would need to pull the data from the DNS name (URL). It wont work by IP address. Does anyone know if this is possible?
- Henrik_Gyllkran
Nimbostratus
Sure, you can have pool members based on FQDN and you can rewrite the host header in the requests to whatever you need.
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com