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

  • Question

  • User1494574938 posted

    Friends, 

    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" />
        </conditions>
        <action type="Redirect" url="Activa-LT/" redirectType="Permanent" />
        </rule>
    



    Appreciate any help 

    Friday, May 28, 2021 8:14 AM

All replies