Forum Discussion

2 Replies

  • Hi

    It could be as simple as this

    when HTTP_REQUEST {
        if {[string tolower [HTTP::host]] eq "www.domain.com")}{
            if {[string tolower [HTTP::uri]] eq "/tickets/841" } {
            HTTP::redirect "https://www.anotherdomain.com/test/event/841/seatplan/"
            }
        }
    }
    

    However, if your VIP is only hosting content from then you could omit the domain validation part. Also, again depending on your setup, you might want to include some redirect loop config if it is needed

  • Hello,

    You can use this irule no matter the number of the ticket. the ticket number can be dynamic and I think it's your need.

    when HTTP_REQUEST {
    
    set hostname [string tolower [HTTP::host]]
    set uri [string tolower [HTTP::uri]]
    
        if {$host eq "www.domain.com" && $uri starts_with "/tickets/" }{
            set numberticket [string range $uri 9 end]
            set redirecturi "/test/event/$numberticket/seatplan/"
            HTTP::redirect "https://www.anotherdomain.com$redirecturi"
            }
    }