Forum Discussion

Hol_Admins's avatar
Icon for Nimbostratus rankNimbostratus
Jan 14, 2021

URL redirection based on port and path

I need help to redirect the URLs



1 Reply

  •  ,

    Now as you want redirection on port 443 as well as 9443, so you would need two separate virtual servers using same IP (which is associated with which will be listening on both these ports. You can also have single virtual server which will listen on both ports using port list option.

    First 3 redirection will be carry out by virtual server which is listening on port 443 and remaining redirections will be done by virtual server which is listening on port 9443.

    You can bind below iRule to each of the virtual server for the redirection.

    when HTTP_REQUEST {
    if { [HTTP::host] contains ""}{
    if { ([HTTP::uri] equals "/") || ([HTTP::uri] equals "/Site") || ([HTTP::uri] equals "/site")}{ 

    Hope it helps!