cancel
Showing results for 
Search instead for 
Did you mean: 

URL redirect/rewrite to external site/header change with internal CA.

Javi_packetz
Altostratus
Altostratus

Hello everyone!

 

I will start by saying I have scoured this site and found a few instances of what might resemble my issue. I have tried to use different posted solutions, but I am still stuck. I will post down below my needs with examples.

 

1. I have an external url I am going to be forwarding traffic to and lets call it www.wallyworld.com. I have an internalsite which we will call www.internalworld.com that I need to write the external header to with a specific url after and lets call it /brand/. 2. after step one is accomplished, then I will need a link on the external url to be added after the added /brand/. 3. I still need to use my internal certificate successfully. Can this be accomplished? examples down below!

 

1. redirect from internal site to external site transparently(maintaining internal url)- www.internalworld.com/brand/ redirected to but maintaining internal url ->  www.wallyworld.com

 

2. added link - www.internalworld.com/brand -> add any link that is selected on the external site. example would be if they selected a link named dining. -> www.internalworld.com/brand/dining/

 

3. certificate - still use my internal certificate successfully after the header change. 

 

10 REPLIES 10

Not applicable

Special Shout-out Badge to the any/all non-f5er who help .

#bounty​ 

Thank you!

Sure!

Gonna be hard-pressed to find better help than  and  - might end up with 2 shout out badges. 🙂

------
Lief ZimmermanLiefZimmerman | @LiefZF5 | DevCentral Community Manager

 ,

 

Below iRule will help you to redirect request from external URL to internal URL by keeping brand/<requested-URI> URI part.

 

Once request is redirected to www.internalworld.com, client will get certificate available on this internal site.

 

Hope it fulfills your use case.

when HTTP_REQUEST { if { [HTTP::host] equals "www.wallyworld.com"} { HTTP::redirect "https://www.internalworld.com/brand[HTTP::uri]" } }

 

Hey  ,

 

thank you for the help, but this is only part of my issue which I find to be the easiest. I can redirect with no issues, but the issue comes into play is the redirect with the header/url change.

 

 

Trying to understand your requirement, if its redirect - its fairly simple. Mayur has shared the Irule, add it to the VIP of wallyworld setup & the client should be redirected to the internalworld website.

 

But there's a catch, are the users internal or external ? external users can't reach the internal site unless that's exposed to Internet.

 

Or are you trying to rewrite the setup, like User should access wallyworld, but transparently the traffic should be sent to internalworld setup, client will always see wallyworld in his browser...

 

Tell us more about your requirement & the issue you are facing after deploying the above rule.

  Thanks for the reply!

 

So the issue is that the users are internal and need a redirect to an external site, but transparently so. The url should still look like the internal url and also use my cert. Not sure if im correctly explaining myself.

And this external site, is that something you manage too (part of your organization). If yes, does the Internal LTM has route to the DMZ LTM or its backend servers ? If the external site is not yours, your basically trying to screen scrape the data or use it like iframes ?

Please correct my understanding.

Jai Kumar was wondering if you could help me.  I'm doing the opposite here.  I want external users to be able to hit an external facing URL that resolves to a VIP on our DMZ LTMs and have it redirect to an internal URL that isn't public facing.  Is this possible?  

Redirect based on a URI