Untitled

 avatar
unknown
plain_text
5 months ago
509 B
6
Indexable
when HTTP_REQUEST {
    # Vérifie si le host match "recette*.domain.com"
    if {[HTTP::host] matches_glob "recette*.domain.com"} {

        # Extraire la partie qui correspond à "recette*"
        set subdomain_part [findstr [HTTP::host] "recette" 0 ".domain.com"]

        # Construire le nouveau domaine avec la partie capturée
        set new_host "${subdomain_part}.nouveaudomaine.com"

        # Réécrire l'en-tête Host avec le nouveau domaine
        HTTP::header replace "Host" $new_host
    }
}
Editor is loading...
Leave a Comment