Forum Discussion
CSA
Nimbostratus
Mar 23, 2010Adding www. before HTTP::host / regexp matching
Hi,
We have today many websites like www.AA.domain.com where AA is a ccTLD (a country code). We want to have the websites working when users type AA.domain.com.
In the D...
Hamish
Cirrocumulus
Mar 23, 2010Hmm... Well, leaving aside the fact that you shouldn't have it as a CNAME (Because as a domain you'll have an SOA record plus maybe an MX record, and you shouldn't have any other records if you have a CNAME record). Best create it as an A record instead... Anyway...
IIUC what you're trying to do is if the host is NOT www.domain.com then do the redirect? Sorry, I'm not sure what regex syntax you're using there, but it doesn't look right... Would
if {!(string tolower [HTTP::host]] equals "www.domain.com") } {
work just as well? If you just to to match when the host isn't www.domain.com? Using a regex for a simple match seems a bit overkill to me.
H
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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
