Forum Discussion
301 IRule URL Redirect
Hi, Can someone please help me as i am trying to create a conditional Irule 301 Redirect from our old domain "www.abc.ie/business/home" to www.business.abc.ie/.
Where i need the condition is if the server looks for the destination URl and if it does not exist, it will redirect the user to the home page - www.business.abc.ie/ or a specific URL
4 Replies
- Rene_C__129338
Nimbostratus
Without further details, and if you want to react on any 404 returncode, you could do something like that:
when HTTP_RESPONSE { if {[HTTP::status] eq "404"}{ HTTP::respond 301 Location "https://my.new.host/my/special/url" } }- Sean2010_159752
Nimbostratus
Thanks Rene, does that mean all pages within the domain will redirect too? Eg www.abc.ie/business/home/ accounting to www.business.abc.ie/accounting. Thanks
- Rene_C_
Nimbostratus
Without further details, and if you want to react on any 404 returncode, you could do something like that:
when HTTP_RESPONSE { if {[HTTP::status] eq "404"}{ HTTP::respond 301 Location "https://my.new.host/my/special/url" } }- Sean2010_159752
Nimbostratus
Thanks Rene, does that mean all pages within the domain will redirect too? Eg www.abc.ie/business/home/ accounting to www.business.abc.ie/accounting. Thanks
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
