Quantcast
Channel: All Forums
Viewing all articles
Browse latest Browse all 26542

IIS rewrite problem

$
0
0

Hi All,

Good Morning

i am trying to craete some reules on IIS 7 rules

for example

  <rule name="contr">
                <match url="contractor" />
                <action type="Rewrite" url="contractorstate.aspx" />
              </rule>
                                  
             
                <rule name="concrete-contractor">
                    <match url="concrete-contractors/(.+)/(.+)/(.+)" />
                    <action type="Rewrite" url="ContractorCity.aspx?Country={R:1}&amp;State={R:3}&amp;StateName={R:2}" />
                </rule>

see i have to matching url i)  <match url="contractor" />redirect to  " url="contractorstate.aspx"" page

ii)      <match url="concrete-contractor/(.+)/(.+)/(.+)" /> redirect to url="ContractorCity.aspx?Country={R:1}&amp;State={R:3}&amp;StateName={R:2}" page

but as contractor word is already there in first rule, so its redirecting to contractorstaete.aspx, its not going for next rules

basically its not assuming "concrete-contractor" as a single word, its picking up concrete and contractor as two diff words, so its picking up the first rules as its finding the word contractor in first rule only, so its redirecting to that page

Please help how can we use (-) there so it should consider "concrete-contractor" as single word rather than two words

Thanks


Viewing all articles
Browse latest Browse all 26542

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>