Forum Discussion
Ramesh_GK_75103
Nimbostratus
Oct 27, 2008Need help on HTTP Rewrite Rule
Hi,
Can somebody help me with the iRule that does the following.
I have 2 physical servers running 2 web servers running on 80 and 8080 on each node.
http://www.domain.com goes to default http://www.domain.com/
http://www.domain.com/web should rewrite the URL to http://www.domain.com:8080/intranet and it should rewrite it again back in the responses also along with session persistance and cookie.
Thanks in advance.
GK
- Arie
Altostratus
Wouldn't it be easier (and cleaner) to create a subdomain (e.g. intranet.domain.com)? - Ramesh_GK_75103
Nimbostratus
Yes it is but it is mandatory that we need to have a single dns name for all the web components - Scott_85521
Nimbostratus
Rather than an iRule you could use HTTP Classes to select the pool (so you need two separate pools, on one 80 the other on 8080) based on URI content and also rewrite it (this will be transparent to the user), applying the default cookie persistence profile will then persist the users as you desire. - hoolio
Cirrostratus
Else, it looks like the proxypass iRule that Kirk wrote would work for this scenario:
Recent Discussions
Related Content
DevCentral Quicklinks
* 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
Discover DevCentral Connects