Can we ignore some links having a specific css class during the iis outgoing rewrite rule

Suppose I use an outbound rule that enters the country code in all the links in the default.aspx page, but I like to know if we can write an outbound rule that ignores several hyperlinks based on the css class.

suppose default.aspx pages have these links

<a href="http://localhost:8800/default.aspx">Home</a>
<a href="http://localhost:8800/default.aspx">Home</a>
<a href="http://localhost:8800/default.aspx">Home</a>

where url rewrite will enter the country code, and again my page has several links, as shown below, where all links have an attached CSS class

<a href="http://localhost:8800/prod.aspx" class = "clsignore">Home</a> 
<a href="http://localhost:8800/forum.aspx" class = "clsignore">Home</a> 
<a href="http://localhost:8800/blog.aspx" class = "clsignore">Home</a>

now see above links that have a css class attached by clsignore, so I want to give the command to rewrite the rule, as a result it will not enter the country code in those links that have a css class called clsignore.

, , .

href

<rule name="outbound rule1" preCondition="Ishtml">
                    <match filterByTags="A" pattern="^/(.*)" />
                    <conditions>
                        <add input="{URL}" pattern="^/([a-z]{2})/(.*)" />
                    </conditions>
                    <action type="Rewrite" value="http://{HTTP_HOST}:8080/{C:1}/{R:1}" />
                </rule>

0

All Articles