Forum Discussion
iRule URI redirect
Hi all,
This has probably been asked 100 times but I can't find anything definitive.
I've had a request from one of our service groups that require us masking the URI of a URL. So basically what we need to do is change www.abc.com/Connect/Service.main to www.abc.com.
I've been made aware that we cannot do this on the server as it would have to be replicated throughout the web server farm.
Does anyone know of a simple iRule that could mask the URL and the end user would only ever see www.abc.com
Any help would be appreciated as I am very new to iRules.
Thanks,
Tam.
3 Replies
- Leonardo_39231
Nimbostratus
Tam, Do you want the user/client to enter in www.abc.com but the server will see www.abc.com/Connect/Service.main?
Leonardo
- Hannes_Rapp
Nimbostratus
The iRule below will send incoming user request of "www.abc.com" to "www.abc.com/Connect/Service.main" in the back-end server. User will only see the www.abc.com in the web-browser location bar.
Please note that by using this approach you can only map a single hidden URI to an exact location of "www.abc.com".
when HTTP_REQUEST { if { (([HTTP::host] == "www.abc.com") && ([HTTP::uri] == "/" )) }{ HTTP::uri "/Connect/Service.main" } } - Thomas_McLean_1
Nimbostratus
Leonardo,
Yes exactly that but the user will never see the appending /blabla but just the root URL www.abc.com
Hannes,
Thanks, I will look into that iRule and implement it and reply tomorrow when I get to work.
Thanks again for your efforts everyone.
Tam.
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