Forum Discussion

Kevin_Holicky_5's avatar
Kevin_Holicky_5
Icon for Nimbostratus rankNimbostratus
Nov 20, 2006

http::redirect returns 302 http code

I am trying to use my LTM to redirect a bunch of domains to an exact domain. Our customer insists it being a 301 redirect.

 

 

Currently using this simple iRule i get a 302 response:

 

when HTTP_REQUEST {

 

if { [matchclass [HTTP::host] equals $::ListOfSites] } {

 

HTTP::redirect "http://www.domain.com[HTTP::uri]"

 

}

 

}

 

 

Can someone tell me if its possible to have the redirect respond with a 301?

 

 

Thanks
  • hoolio's avatar
    hoolio
    Icon for Cirrostratus rankCirrostratus
    You should be able to use HTTP::respond with a 301 response code and location. You can check the wiki for syntax and examples (Click here)

     

     

    Aaron