iis htaccess 相当于重写 url
我想将类似于 domain.com/products.aspx?product=20
的 URL 重写为 domain.com/products/20
之类的内容。
或者更确切地说,我想将后者重写为前者。
我知道如何在 Apache 中使用 .htaccess
执行此操作,但在 IIS 中如何执行此操作?我认为我需要更改 web.config
文件,但我会使用什么规则?
任何指示将不胜感激!谢谢你!
I would like to re-write a URL similar to domain.com/products.aspx?product=20
into something like domain.com/products/20
.
Or rather, I'd like to re-write the latter, into the former.
I know how to do this is Apache using .htaccess
but how would I do it in IIS? I think I need to change the web.config
file, but what rules would I use?
Any pointers would be greatly appreciated! Thank you!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以找到一个 IIS 重写模块,它应该可以完成您想要的操作。您可以在这里找到它:
http://www.iis.net/download/urlrewrite
如果链接失效,您可以找到它搜索“IIS url 重写”
You can find an IIS rewrite module which should do what you want. You can find it here:
http://www.iis.net/download/urlrewrite
If the link should rot you can find it searching for "IIS url rewrite"