Forum Discussion

Tariq_Sako_9038's avatar
Tariq_Sako_9038
Icon for Nimbostratus rankNimbostratus
Nov 07, 2012

HTTP URL redirect or replace

hi all,

 

i need help to configure an irule, when a user request www.example.com which is pointed to my VIP, i want the LTM change this URL to something like www.example.com/forums/login.jsp and request it from the pool.. i dont want the user to enter this long URL.. can you help me to achive that please..

 

3 Replies

  • This should do it;

    
    when HTTP_REQUEST {
     if { [string tolower [HTTP::uri] equals "/" } {
      HTTP::uri "/forums/login.jsp" } 
    }
    
  • If you're just checking for a URI of /, you can skip setting the URI to lowercase:

    
    when HTTP_REQUEST {
      if {[HTTP::uri] equals "/" } {
        HTTP::uri "/forums/login.jsp"
      } 
    }
    

    Aaron