Forum Discussion
Re-direct question
I have external users going to a site that is having its name changed. I want to do a redirect to the new site. easy
The site is an https:// and I need it to redirect to the new https:// I have a cert on the existing and will buy a cert for the new but I want the users to actually see in the browser bar the new address. I am thinking this can be done with a 301 redirect?
can the following be done?
https:// abc.com --> VIP --> redirect in browser --> https:// newabc.com --> VIP
4 Replies
- nitass
Employee
is it same vip or different one?
if it is different one, can you try something like this?[root@ve10:Active] config b virtual bar list virtual bar { destination 172.28.19.79:443 ip protocol 6 rules myrule profiles { clientssl { clientside } http {} tcp {} } } b[root@ve10:Active] config b rule myrule list rule myrule { when HTTP_REQUEST { if {[string tolower [HTTP::host]] equals "abc.com"} { HTTP::respond 301 Location "https://newabc.com[HTTP::uri]" } } } [root@ve10:Active] config curl -Ik https://172.28.19.79/something -H "Host: abc.com" HTTP/1.0 301 Moved Permanently Location: https://newabc.com/something Server: BigIP Connection: Keep-Alive Content-Length: 0
if it is same one, you may check about sni.
sol13452: Configuring a virtual server to serve multiple HTTPS sites using TLS Server Name Indication (SNI) feature
http://support.f5.com/kb/en-us/solutions/public/13000/400/sol13452.html
Multiple Certs, One VIP: TLS Server Name Indication via iRules by Colin
https://devcentral.f5.com/Tutorials/TechTips/tabid/63/articleType/ArticleView/articleId/1086451/Multiple-Certs-One-VIP-TLS-Server-Name-Indication-via-iRules.aspx
hope this helps. - Daniel_104050
Nimbostratus
thank you for confirming and elaborating on my question! - Daniel_104050
Nimbostratus
Second question, can a redirect and stream be in the same irule? - nitass
Employee
Second question, can a redirect and stream be in the same irule?why not? anyway, may you explain what you want? so, people here may be able to give you idea or example.
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