Forum Discussion

Pav_70755's avatar
Pav_70755
Icon for Nimbostratus rankNimbostratus
Oct 27, 2008

https re-directs

Hi,

 

 

I am trying to re-direct two https secure sites, currently there is an i-rule in place to re-direct the standard sites:

 

 

elseif { [HTTP::host] == "www.url.com" } {

 

HTTP::redirect "http://www.welcome.com"

 

 

I want to have the same re-direct for the secure site so:

 

 

https://www.url.com to re-direct to www.welcome.com

 

 

SSL is enabled in the i-rule any help would be much appreciated.

 

 

 

Thanks

 

 

 

Pav

 

 

3 Replies

  • Thanks for the reply the re-directs are on the same virtual server so I basically want to re-direct:

     

     

    https://www.url.com/welcome.asp and https://www.url.com/join.asp

     

     

    to

     

     

    http://www.url.com/joining_form

     

     

    so how would I incorporate the rule you suggested to do this re-direct?

     

     

    So its actually a https to http re-direct

     

     

    Thanks

     

     

     

    Pav
  • Hi Pav,

    You're going to have to first do SSL decryption in order to be able to do this, you can't manipulate the HTTP request before it is decrypted (see this post (Click here) for more info).

    Other than that, you would just need to do:

      
        
      when HTTP_REQUEST {  
         if { [HTTP::uri] eq "welcome.asp" or [HTTP::uri] eq "join.asp" } {  
           HTTP::redirect "http://www.url.com/joining_form"  
        }  
      }  
      

    This post (Click here) also has good info on doing this with matchclass if you need more than 2 or 3 URL's to match.

    Denny