Redirect to 404 if there is "?" (Question mark) in the url RRS feed

  • Question

  • User1494574938 posted


    I am trying to redirect a page if there is a "?" in the URL using web.config,  but it is not working

    I added a condition to negate if the param is "?"

    The rule is 

        <rule name="Activa-LT_rd" stopProcessing="true">
        <match url="Activa-LT.asp" />
        <conditions logicalGrouping="MatchAll" trackAllCaptures="false">
        <add input="{UNENCODED_URL}" pattern="\?" negate="true" />
        <action type="Redirect" url="Activa-LT/" redirectType="Permanent" />

    Appreciate any help 

    Friday, May 28, 2021 8:14 AM

All replies