简体   繁体   中英

Which way is best for defining URL Redirect Web.config or in IIS?

I need to define URL redirect for my website so after search on google, I found two ways to do this. One way is to define the redirect rule in web.config file and the other is to create a rule in IIS. Now my question is, is there any difference between these two approaches? If yes then which approach is better?

If anyone knows please suggest. Thanks in advance.

There is no difference between the two methods. If you create a rewrite rule in the IIS panel, it will also be displayed in the web.config. If you create a rewrite rule in web.config, you can also see it in the IIS panel. In other words, no matter which method you use to create rewrite rules, their effects are the same.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM