Forum Discussion
david0512_20548
Oct 27, 2014Nimbostratus
irule to rewrite header but respond with 200
Hi All,
Im trying to setup an irule (and struggling :-)) that will perform the following. Upon accessing a site, the request will be rewritten to essentially send the client elsewhere, however rath...
david0512_20548
Oct 28, 2014Nimbostratus
So this is the requirement from the customer
- There are currently various "test" domains which are live, such as test.co.uk, test.es, test.com, and so on
- A set of pages have been created using an application. This application is currently deployed on IP=1.1.1.1
- This application’s pages will be available as www.ultimatetest.com/www.test.com/p/Pages (with each test domain having its own sub-directory)
- For this to work successfully, we need the following:
- ultimatetest.com DNS to point to 1.1.1.1 (where application resides)
- URL handling rule: All requests to www.test.xx/p/$1 to go to www.ultimatetest.com/www.test.es/p/$1
- Once this rule is setup, a request for a page www.test.com/p/xxxxx/xxxx will result in a 200 response for the user. This will work using the URL handling rule sending requests ahead without generating a response to the user and the 200 response coming from ultimatetest.com
- shaggyOct 28, 2014Nimbostratusapproximately how many domains will be handled by the iRule, and will it change often?
- ArieOct 28, 2014AltostratusWhen you say "will result in a 200 response" (7), do you mean that the user is expected to retrieve a page/resource from the pool member(s)? If so, this wouldn't be very hard to do in an iRule. Another option would be to access the pages from the actual test domains (without the domain folder name). This is a standard option in mod_rewrite (Apache), but it's also easy to do with an iRule. You could then host all the different domains under a single web server instance.
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