Forum Discussion
Deepak_Muvvala1
Nimbostratus
Mar 27, 2009Redirection
Hi,
This is what I would like to achieve using a i-Rule
when the user types
http://x.x.x.x/despense/conical/index.asp
to be re-drirected/re-written to
http://x.x.x.x/Sample/despense/conical/index.asp
I would just like to insert the word "Sample"
And I have my i-Rule written like this
when HTTP_REQUEST {
HTTP::redirect "http://[HTTP::host]/Sample[HTTP::uri]"
}
This is not working. Any idea?
- hoolio
Cirrostratus
That would loop until the browser or user gives up. You can add a check to see if the path already starts with /Sample before redirecting:when HTTP_REQUEST { Redirect client if request doesn't start with sample if {not ([HTTP::path] starts_with "sample")}{ Redirect HTTP::redirect "http://[HTTP::host]/sample[HTTP::uri]" } }
- Deepak_Muvvala1
Nimbostratus
Thanks 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