Forum Discussion
URL Redirection
Hi All! I need to write a iRule to redirect users to a new set of domains with a 301 HTTP Status Code. Here is a example [
- list01.olddomain.com.co/uri should be redirected to list01.newdomain.com.co/uri
- list02.olddomain.com.co/uri should be redirected to list01.newdomain.com.co/uri
- list03.olddomain.com.co/uri should be redirected to list01.newdomain.com.co/uri
- list04.olddomain.com.co/uri should be redirected to list01.newdomain.com.co/uri
and so on...
Is a good approach to create a DataGroup List with all the old domains and write a irule using HTTP::header replace?
Any other idea is welcome
Thanks in advance
- Mohamed_Lrhazi
Altocumulus
Data groups are good whenever you have lists of constants.. It also makes it easy to maintain them.
To "redirect", use HTTP::redirect
This looks like a perfect start for you: https://community.f5.com/t5/codeshare/universal-http-host-redirect/ta-p/275998
Why do you think you would need to modify any headers?
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