如何配置可选或“无关”网址? [英] How do configure optional or "extraneous" URLs?

查看:170
本文介绍了如何配置可选或“无关”网址?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您将如何配置/处理无关/可选的网址实体(别名,也许)?

How would you configure/handle extraneous/optional URLs entities (aliases, maybe)?

SO是一个很好的例子:

SO is a good example:


  • stackoverflow.com/questions/99999999 /

  • stackoverflow.com/questions/99999999/ question-goes- strong>(糟糕的例子,但我不能想得更好)

Amazon URL更容易混淆href =http://rads.stackoverflow.com/amzn/click/B000FI73MA =nofollow noreferrer> Kindle )

Amazon URLs are even more confusing (e.g., the Kindle)


  • amazon.com/gp/product/B000FI73MA /

  • amazon.com/ Kindle-Amazons-无线读取设备 / dp / B000FI73MA /

  • amazon.com/gp/product/B000FI73MA/
  • amazon.com/Kindle-Amazons-Wireless-Reading-Device/dp/B000FI73MA/

[ EDIT ]这可能不是最佳的行动计划,

[EDIT] This probably isn't the best plan-of-action, but I'm really asking this in general vs. for any single server.

推荐答案

这种技术通常称为url重写。如果您在IIS中寻找解决方案,可以使用 ISAPI重写 ,这与 mod_rewrite 非常相似为apache。或者,您可以访问 ASP.Net MVC路由 机制。

This technique is commonly known as url rewriting. If you are looking out for a solution in IIS, you can use ISAPI rewrite, which is quite similar to mod_rewrite for apache. Or else, you can go for ASP.Net MVC routing mechanism.

这篇关于如何配置可选或“无关”网址?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆