Forum Discussion

3 Replies

  • not sure it will work or not When HTTP_RESPONSE { If { ( [HTTP::URI] starts_with “/store/category/”) } { HTTP::header insert “location=category” } }
  • if {[HTTP::uri] starts_with /store/} {
       if {[HTTP::query] eq ""} { 
         set sep "?" 
       } else { 
         set sep "&" 
       }
       HTTP::uri "[HTTP::uri]${sep}location=[getfield [HTTP::uri] {/} 3]"
    }
    

    /store/category/ becomes..

    /store/category/?location=category

    /store/joe/?value=2 becomes...

    /store/joe/?value=2&location=joe

    • Kevin_Davies_40's avatar
      Kevin_Davies_40
      Icon for Nacreous rankNacreous
      If this answer has help solve your problem, please tick the left of the post. Thanks.