Forum Discussion
65,000 character limit in irule and URI redirects
- Mar 31, 2020
Use an external datagroup to store your translations,
K73862425: Creating external data groups
Your irule looks up the key, and redirects to the value indexed by the key.
An update to this.
I've created the data group. The information looks like this
"unique/uri/is/here" := "https://www.domain2.net.org/unique/uri/goes/here",
That goes on for about 1000 rows. I saved it as a CSV file in notepad.
I uploaded that file to the F5 as per https://support.f5.com/csp/article/K73862425. I created the Data Group File List as a name like DGNAME.TXT, chose String as the File Contents and the Key Seperartor as :=. The file imported ok
I then created the External Data Group and named it NAMEHERE and chose the DGNAME.TXT file I uploaded
The problem I have now is getting the iRule to work. I've looked at a few options but none seem to work. This is my latest iRule
when HTTP_REQUEST {
if { [class match [HTTP::uri] contains "NAMEHERE"] } {
HTTP::respond 301 location "https://[HTTP::host][class lookup NAMEHERE]"
}
}
I'm unable to get anything to happen and the page times out.
Any ideas would be appreciated
Thanks
- Simon_BlakelyApr 02, 2020Employee
You need
when HTTP_REQUEST { if { [class match [HTTP::uri] contains NAMEHERE] } { HTTP::respond 301 location "[class match -value [HTTP::uri] contains NAMEHERE]" } }
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