Forum Discussion
irule to edit a URI
so I simplified my irule and my issue is that I cant get it to drop the first directory form the URI. I have been trying many different things I found here but nothing seems to work.
First use hsl::open to define where to send logs and save it as a vaiable HSLwhen CLIENT_ACCEPTED { set hsl [HSL::open -proto UDP -pool graylog2-syslog-pool] } when HTTP_REQUEST { HSL::send $hsl "This is the HTTP URI [HTTP::uri]" HSL::send $hsl "This is the HTTP Path [HTTP::path]"
set directory [lindex [split [string tolower [HTTP::uri]] "/"] 1]
set uri [string map {"/$directory/" "/"} [string tolower [HTTP::uri]]] HSL::send $hsl "This is the new uri $uri"
HTTP::redirect "http://$directory.domain.com/"
when this works I will append the new uri to the redirect}
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