how to add HTTP_ACCEPT_LANGUAGE if only missingRSS

1 reply

Last post Oct 09, 2019 05:05 AM by Jalpa Panchal

  • how to add HTTP_ACCEPT_LANGUAGE if only missing

    Oct 08, 2019 03:10 PM|khusmeno|LINK


    I want to add the header HTTP_ACCEPT_LANGUAGE with a default value to the request only if it missing. The rule below, does add it on every request without checking for existence. Is it possible to do that with URL Rewrite?

    This should work for every request verb, url etc. , only a missing http header should be added if absent in the request headers.

     <rule name="Add LANGUAGE only if missing" enabled="true">
                        <match url="(.*)" />
                            <set name="HTTP_ACCEPT_LANGUAGE" value="TR" />
                        <action type="None" />

  • Re: how to add HTTP_ACCEPT_LANGUAGE if only missing

    Oct 09, 2019 05:05 AM|Jalpa Panchal|LINK

    Does this rule change the value of the acceapt-language header?

    I tried your rule but it will not change the value. 


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue.
    If you have any compliments or complaints to MSDN Support, feel free to contact