Forum Discussion

Nitin_Khemani_6's avatar
Nitin_Khemani_6
Icon for Nimbostratus rankNimbostratus
Feb 26, 2009

iRule to redirect either to http or https

Three Virtual Servers are configured with a single Virtual IP serving ports 80 (HTTP) / 443 (HTTPS) / 8443.

 

 

Virtual Servers for 80 & 443 have individual iRule's configured and are working fine, we now need to configure an iRule for the Virtual Server serving port 8443 which should do the following:

 

 

a) any request received for www.domain.com:8443 should be redirected either to http://www.domain.com:8443 or https://www.domain.com:8443 based on the client requirement &

 

 

b) while redirecting the iRule should also append & redirect the uri to another uri, for eg.

 

 

http://www.domain.com:8443/cif/services/spm should get redirected to http://www.domain.com:8443/newservices/spm

 

 

this redirection should work for both http & https requests
  • hoolio's avatar
    hoolio
    Icon for Cirrostratus rankCirrostratus
    Hi,

     

     

    You're trying to support HTTP and HTTPS on the same IP:port? What is the client requirement that determines whether to redirect to http or https? What is the criteria for redirecting to a new path (/cif/services/spm -> /newservices/spm)?

     

     

    Thanks,

     

    Aaron
  • hi aaron,

     

     

    thanx for the quick reply... hope this answers your questions...

     

     

    the application at the backend uses port 8443 that is why we are trying to support both HTTP and HTTPS on the same IP:port, the request is generated through the application which responds to an initial client request, the redirection moves the request to requested page

     

     

     

    regards,

     

     

    nitin