Forum Discussion
Anatolyint
Apr 08, 2021Nimbostratus
Thanks,
How can i apply this only if domain matches DOMAIN.COM for example?
- SanjayPApr 08, 2021Nacreous
Let us know how the testing goes
when HTTP_REQUEST { switch -glob [string tolower [HTTP::host]] { "domain.com" { set path [lindex [split [string tolower [HTTP::uri]] "/"] 1] set uri [string map -nocase "/$path/ /" [HTTP::uri] ] HTTP::respond 301 Location "https://$path.domain.com$uri" } } default { return } } }