Forum Discussion
lchln_304378
Nimbostratus
9 years agoTranslate mod_rewrite to iRules
Hi guys,
Trying to migrate mod_rewrite rules to F5 iRules and am not having much success. The current setup uses a regex to get the subdomain from a HTTP_HOST and then rewrites the URL, appending t...
JG
Cumulonimbus
9 years agoHow about the following:
when HTTP_REQUEST {
if { [string tolower [HTTP::host]] ends_with ".abc.domain.com" } {
switch -glob [string tolower [HTTP::uri]] {
"*pages/*" -
"*test_pages/*" -
"*testpages/*" -
default {
HTTP::redirect "https://abc.domain.com/test/[HTTP::host]/[HTTP::uri]"
}
}
}
}
However, the Apache mod_rewrite rule does not do a redirect.
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
