Forum Discussion
Austin_Geraci_1
Nimbostratus
Mar 13, 2007Redirect Problem
I just want to do a basic redirection;
www.mydomain.com
www.mydomain.com/directory1/directory2
When I use the syntax below I get;
www.mydomain.com/www.mydomain.com/directory1/directory2
How Can I get rid of that initial uri??
Thanks!
when HTTP_REQUEST {
if { [HTTP::uri] eq "/" } {
HTTP::redirect "www.mydomain.com/directory1/directory2/"
}
}
3 Replies
- hoolio
Cirrostratus
If you don't include the protocol in the redirect the browser assumes appends the new redirect value to the URI is just requested. If you add http:// or https:// to the redirect it should work fine:when HTTP_REQUEST { if { [HTTP::uri] eq "/" } { HTTP::redirect "http://www.mydomain.com/directory1/directory2/" } }
Aaron - Austin_Geraci_1
Nimbostratus
Great, I actually found some doc on this last night, i appreciate your quick response!
Are there any specific books on iRules? Or am I just going to find TCL books? Either way, can you point me to some recommended literature?? Or is DevCentral as good as it gets right now??
Thanks! - hoolio
Cirrostratus
That's good to hear.
There aren't any books on iRules. You can get more information on iRules from a few resources:
The iRule wiki on DC (Click here)
The LTM configuration guides on AskF5 (Click here)
The TCL manual for standard TCL commands/syntax (Click here)
And of course the posts in this forum, the codeshare, blogs and guides on DC.
Aaron
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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