Forum Discussion
URI prefix iRule
So if I understand you correctly, if the URI does not begin with /sites/web you want the user redirected to www.common.com/sites/web with the original URI appended. Something like this:
when HTTP_REQUEST {
if { ! ( string tolower [HTTP::uri] starts_with "/sites/web" } {
HTTP::redirect "www.common.com/sites/web[HTTP::uri]"
}
}
If the URI sent from the client is / the user will be redirected to www.common.com/sites/web/. If the URI sent from the client is /table the redirect will be www.common.com/sites/web/table, or if the original URI is /abc/1234 the redirect will be www.common.com/sites/web/abc/1234.
Does that sound like what you want?
Robert
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
