Forum Discussion
GFort_32452
Nimbostratus
May 23, 2012Need some help writting a https redirect
I am new to the F5, two weeks ago I never seen and F5. I currently have a virtual setup with two nodes using port 443. Everthing seems to be working fine. I am trying to figure out how to shortent he URL the users has to enter. Currently they have to enter I would like to shorten with an irule if possible to where they only need to type in and it will take that and redirect them to the longer URL transparently. I looked at some iRules and they really did not make alot of sense to me right now. The resetmypasswordqa is the name of the virutal server on the F5. Any help or information is greatly appreciated.
Thanks
Gary
5 Replies
- Brian_69413
Nimbostratus
You need to create an iRule and apply it to your virtual server under the resources tab. Perhaps something like this?when HTTP_REQUEST { if { ([HTTP::path] eq "") or ([HTTP::path] eq "/") }{ HTTP::redirect "https://resetmypasswordqa/itim/self/Login/Logon.do" } } - GFort_32452
Nimbostratus
For some reason when I try to apply an iRule to the virtual server I get the following message:
01070394:3:HTTP_REQUEST event in rule (rule_name) requires and associated HTTP or FASTHTTP profile on the virtual server (virtual_server_name)
I went into profiles, services, and http and created one that is had all the defaults and then applied the profile to the virtual server, I was then able to apply the iRule to the virtual servers. is there any thing unique I would need to define in the profile?
Sorry I am asking so many questions, I have never seen an F5 until two weeks ago.
Gary - GFort_32452
Nimbostratus
After I applied the profile, with the default settings, the iRule worked great. I have alot to learn. Thanks for all the help.
Gary - GFort_32452
Nimbostratus
After I applied the profile, with the default settings, the iRule worked great. I have alot to learn. Thanks for all the help.
Gary - Kevin_Davies_40
Nacreous
Welcome to the world of F5 Gary.
No just the defaults on the http profile will be enough to begin with.
Regards
Kevin
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