Forum Discussion
Irule for multiple links in the same website
Hi,
We are managing a website called abc.test.com.uk and it contains few links inside the website.
We have a requirement to do the redirection as follows:
http://abc.test.com.uk:10000/dir ->>>> https://def.test.com.uk/dir http://abc.test.com.uk:10000/dir/repository.jlp ->>>> https://def.test.com.uk/dir/repository.jlp ->>>> https://def.test.com.uk/dir/directory.jlp http://abc.test.com:10000/bld ->>>> https://def.test.com/bld
In simple terms http://abc.test.com:10000 should be replaced by https://def.test.com whenever a user call comes.
Could you please advise how to write the irule for the above condition? Thanks.
5 Replies
- Henrik_Gyllkran
Nimbostratus
So will the users first come to http://abc.test.com.uk on port 80 and then click on the link and send the request to http://abc.test.com.uk:10000 and you wan't the redirection to happen there? Or do you want the links themselves to be rewritten on the page to https://def.test.com instead?
- F5newbie2015_23
Nimbostratus
Thanks Henrik for the reply.
The users will first connect https://def.test.com.uk via 443. Once logon, they will click the internal link
http://abc.test.com.uk:10000/dir -> which should be redirected to their end as https://def.test.com.uk/dir.
http://abc.test.com.uk:10000/dir/repository.jlp ->>>> https://def.test.com.uk/dir/repository.jlp
Our requirement is, the hostname which is abc.test.com.uk and port no 10000 should not be visible for the users.
Thank you.
- F5newbie2015_23
Nimbostratus
Apologies. Forgot to update.
We are using BIG IP V11.4.0 Build 2454.0
- Henrik_Gyllkran
Nimbostratus
Ok, now I understand. So what you probably want to do is so that the links shouldn't even contain http://abc.test.com.uk:10000/dir but rather point to https://def.test.com.uk/dir instead. In some applications it's actually possible to configure so that the application is aware that it resides behind an ADC and allows you to configure the external address.
In case that possibility doesn't exist there is always the option to let the BIG-IP rewrite the pages so that the internal URL:s is translated to the external one. This is easiest accomplished with the stream profile.
Basically what you do is to configure the profile to look for http://abc.test.com.uk:10000 and replace with https://def.test.com.uk.
- Henrik_Gyllkran
Nimbostratus
Oh, and another thing - I would recommend that you also enable a http compression profile on the virtual server, since that prevents the servers behind the BIG-IP to respond with compressed data. If the data is compressed the BIG-IP won't be able find the string to be replaced.
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