Forum Discussion
SathishF5Dasam
Jun 04, 2016Nimbostratus
Regex to irule
Hi All,
I'm new to Irule and find difficult to migrate this regex into irule
Regex
RewriteRule ^/company/(.*)(?http://www.test.com/company/$1/en_gb [R=301,L]
My config
"/company/*...
Yann_Desmarest
Jun 04, 2016Cirrus
Hi,
the irule below is a basics for your need :
when HTTP_REQUEST {
if { [HTTP::path] starts_with "/company" and !([HTTP::path] contains "en_gb") } {
set uri "http://www.test.com[HTTP::path]/en_gb"
HTTP::respond 301 noserver "Location" "$uri" Cache-Control" "no-cache, must-revalidate"
}
}
Hope this help
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