如何管理mvc4中的URL路由? [英] How to manage url routing in mvc4?

查看:64
本文介绍了如何管理mvc4中的URL路由?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在处理网址路由



我想重定向页面而不更改网址。

当输入网址www.example时。 com / Default.aspx那个时间网址显示为相同但返回页面主页/索引(控制器/操作)



我想用实际网址重定向页面。

第二个要求是当输入www.example.com/Default.aspx时,在地址栏中显示网址主页/索引并返回此页



如何可能请详细描述。



提前谢谢。

解决方案



参考:

MVC中的路由

I’m working on url routing

I want to redirect page without change url.
When type url www.example.com/Default.aspx that time url show as same but return page Home/Index (Controller/Action)

I want to redirect page with actual url.
And second require is when type www.example.com/Default.aspx that time show url in address bar Home/Index and return this page

How to possible please describe in details.

Thank you in advance.

解决方案

Hi,
Ref :
Routing in MVC


这篇关于如何管理mvc4中的URL路由?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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