Forum Discussion

PeterC_70986's avatar
PeterC_70986
Icon for Nimbostratus rankNimbostratus
Nov 30, 2018

Quotation Mark in a Header Insert irule gets changed to a colon

I am using the below irule to insert a response header. when HTTP_RESPONSE { HTTP::header insert "Link: https://www.mysite.com/pages/other/business.html; rel="canonical" }

 

However when the header is inserted it changes the quotation mark in front of canonical to a colon. So it looks like this: Link: https://www.mysite.com/pages/other/business.html; rel=:canonical"

 

How do I prevent it from changing the quote to a colon?

 

1 Reply

  • Try escaping the quotes.

    when HTTP_RESPONSE { 
        HTTP::header insert "Link" "https://www.mysite.com/pages/other/business.html; rel=\"canonical\"" 
    }