Forum Discussion

Dave_73612's avatar
Dave_73612
Icon for Nimbostratus rankNimbostratus
Jun 25, 2009

Help with 301 redirect irule

Hi guys,

 

 

 

I have setup the following IRULE for a 301 redirect

 

 

when HTTP_REQUEST {

 

if { [HTTP::uri] equals "/index.html" } {

 

HTTP::respond 301 Location "http://www.blah.blah.co.uk/blah-blah-blah/"

 

}

 

 

It appears to work ok however, the - in the URL seem to be messing up the redirect.

 

 

If I set the URL To "http://www.blah.blah.co.uk/blah%2dblah%2dblah/"

 

 

It still does not work.

 

 

Any idea?

 

 

3 Replies

  • Hi,

     

     

    What happens when it doesn't work? Does the client get the redirect and make a new request to http://www.blah.blah.co.uk/blah-blah-blah/?

     

     

    If you use a browser plugin like HttpFox for Firefox or Fiddler for IE, what does the client actually receive when LTM sends the 301 redirect? I'd expect either http://www.blah.blah.co.uk/blah-blah-blah/ or http://www.blah.blah.co.uk/blah%2dblah%2dblah/ to be sent correctly by LTM.

     

     

    Aaron
  • I checked it in fiddler -

     

     

    It does the 301 to the correct URL then I get a 503.

     

     

    I checked the exact URL that the 301 is going to and it works on the web-server.

     

     

  • Is there something different about the request for http://www.blah.blah.co.uk/blah-blah-blah/ when it's made from a redirect versus a request direct to the server or if you just enter that URL in the address bar and make the request to the VIP?

     

     

    Aaron