Forum Discussion
OCC_68606
May 24, 2011Nimbostratus
iRule 301 Location
Hi Everybody,
I am looking for a way to the following:
I want to manage several sites and send it with a permanent redirect to general site, for example:
When I enter www.site1.com, www.site2.com, www.site3.com, etc. redirecto to www.generalsite.com
I made the following iRule:
when HTTP_REQUEST {
switch -glob [string tolower [HTTP::host]]{
"www.site1.com" -
"www.site2.com" -
"www.site3.com" {
HTTP::respond 301 Location "http://www.generalsite.com[HTTP::uri]"
}
}
}
Any ideas???
George.
- Michael_YatesNimbostratusThat should work.
- OCC_68606NimbostratusIt´s working, but sometimes general site has problems to resolve, I put this iRule in VS for www.generalsite.com. What is wrong?
- richard_77048NimbostratusCouldn't you just extend the idea you had originally. Like this:
- OCC_68606NimbostratusThank you for your help, It´s working fine.
Recent Discussions
Related Content
DevCentral Quicklinks
* 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
Discover DevCentral Connects