Forum Discussion
Robert_47833
Aug 12, 2011Altostratus
how to change a string ,such as add a number after some letters
Hi,dear irule
I want to change the host name to another one
for example
www.cjj.com---->www2.cjj.com
cjj.com------>cjj2.com
*.cjj.com---->*2.cjj.com
domain [HTT...
hooleylist
Aug 12, 2011Cirrostratus
I think something like this should work:
switch [string tolower [HTTP::host]] {
"cjj.com" {
HTTP::header replace Host "cjj2.com"
}
default {
HTTP::header replace Host "[getfield [HTTP::host] "cjj2.com" 1]2.cjj.com"
}
}
Aaron
Recent Discussions
Related Content
- May 24, 2019Former Member
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