Forum Discussion

Dishant_298426's avatar
Dishant_298426
Icon for Nimbostratus rankNimbostratus
Dec 09, 2016

URL Redirection IRule

Can i get the Irule for redirection of https://www.pitneybowes.us/shop/ink-and-supplies/postage-meter-ink-and-supplies/for-dm100i-dm125-dm225/en-us/storeus to https://www.pitneybowes.us/shop/in...
  • Dvirus_297774's avatar
    Dec 09, 2016

    Hi Dishant, you can try this:

    (Thanks to Stanislas - using respond, relative path and not use string to lower in case its not necessary)

      when HTTP_REQUEST {
        if { (([string tolower [HTTP::host]] contains "www.pitneybowes.us") and ([HTTP::uri] equals "/shop/ink-and-supplies/postage-meter-ink-and-supplies/for-dm100i-dm125-dm225/en-us/storeus")) {
            HTTP::respond 301 noserver Location "/shop/ink-and-supplies/postage-meter-ink-supplies/for-dm-series/en-us/storeus"
        } 
    }