How many rewrite rules can we add to web.config in mvc

199 views Asked by At

I am using a file called on the web. config's rewrite rule section to add rewrite rules. I have 3000 rules to be added to this file, but my website is not working if I add more than 1000. How many rewrite rules can I add to my file?

1

There are 1 answers

0
Yasin Sunni On

You need to write a rewrite map rule in the web config file as below

<rules>
<rule name="Rewrite Rule">
    <match url=".*" />
    <conditions>
        <add input="{StaticRewrites:{REQUEST_URI}}" pattern="(.+)" />
    </conditions>
    <action type="Rewrite" url="{C:1}" />
</rule>

You can follow the link step it'll help you to rewrite the map from the rewrite rule Click here