Forum Discussion
Dave_73612
Nimbostratus
Jul 01, 2009Multiple 301 redirects and F5 performance
Hi guys,
I have a requirement to do over 40 301 redirects (google ranking purposes) for one of our websites which I was going to implement via IRule attached to the Virtual server for t...
hoolio
Cirrostratus
Jul 06, 2009So you do want to redirect a request for /index.htm to / ? If so, you could just check for /index.htm and replace it with / in the redirect:
when HTTP_REQUEST {
Check if request ends with /index.htm
if {[HTTP::path] ends_with "/index.htm"}{
HTTP::respond 301 Location "[string map {/index.htm /} [HTTP::uri]]"
log local0. "Redirecting to [string map {/index.htm /} [HTTP::uri]]"
}
}
Aaron
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
