Forum Discussion
Luca_55898
Nimbostratus
Aug 18, 2011http URL to HTTPS URL redirect with URI
I need to be able to redirect incomming requests on a HTTP URL to a HTTPS URL with URI.
So what that means is I need:
http://www.mysite.com to redirect to https://www.mysite.com/page1/login.html
I already have a HTTP and HTTPS VIP. The HTTP already redirects to HTTPS.
However i had to use some HTTP classes to redirect to different pools based on the URI.
How can i do this and maintain my existing HTTP class configs?
3 Replies
- Kevin_Davies_40
Nacreous
HTTP Vip
HTTP class
Redirect to https://[HTTP::host][HTTP::uri]
HTTPS VIP
Your existing classes.
If you want to match anything on the HTTP VIP then put it above the http -> https class above.
Kevin (Jarvil) - Luca_55898
Nimbostratus
Sorry i don't quite understand.
The HTTP to HTTPS redirect is working fine.
What i need to do is redirect either http or https www.mysite.com to www.mysite.com/page1/logon.html - Kevin_Davies_40
Nacreous
Then put a HTTP class as already shown on the HTTP VIP to redirect to HTTPS. Then on the HTTPS VIP, add HTTP class with a URI match for / and redirect to the URL you want.
If you want iRules then on the HTTP VIP
when HTTP_REQUEST {
HTTP::redirect "https://[HTTP::host][HTTP::uri]"
}
then on the HTTPS VIP ...
when HTTP_REQUEST {
if { [HTTP::uri] equals "/" } {
HTTP::redirect "https://[HTTP::host]/page1/logon.html"
}
}
Classes are simpler to manage.
Kevin (Jarvil)
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