Forum Discussion
Richard_Dineen
Nimbostratus
Jul 02, 2013Remove pattern from URI
Can an iRule be written to look for a particular pattern in the URI and remove it? What I need to do is remove the "en" in the URI as follows. Redirect www.hostname.comen to www.hostname.com. Or redirect http:www.hostname.comenproducts.aspx?somequery=1 to http:www.hostname.comproducts.aspx?somequery=1. Do anyone know how I would be able to remove the "en" in the URI?
1 Reply
- Kevin_Stewart
Employee
Can I assume that when you say "www.hostname.comen", you mean "www.hostname.com/en"?
If so, then a string map may do the trick:HTTP::uri [string map {"/en" "/"} [HTTP::uri]]
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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