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...
Colin_Walker_12
Aug 16, 2011Historic F5 Account
It's not working because it doesn't know where the first variable stops, and is trying to incorporate the 2 as part of the variable name.
Try this instead:
HTTP::redirect "http://${domainfirst}2${domainleft}[HTTP::uri]"
Here's an example in tclsh:
% set h1 www.srwd
www.srwd
% set h2 9.com
9.com
% puts $h1$h2
www.srwd9.com
% puts $h12$h2
can't read "h12": no such variable
% puts ${h1}2${h2}
www.srwd29.com
%
Colin
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