处理MVC中的.html页面扩展 [英] Handle .html page extension in MVC
问题描述
您好开发者,
我正在进行网址重写,
我想要运行.html扩展页面
例如。 www.xyz.com/abc.html
在这里,我可以运行带有模式的页面
{controller} / {动作} / {参数}
但我想以上面的示例方式运行带扩展名的页面和
。
domain / {name} .html
{name} - 可以是任何东西。
我想在控制器的ActionResult中使用这个{name},
所以我可以调用商店程序来找到合适的结果。
请帮助开发人员....
提前致谢。
试试这个链接
http://weblogs.asp.net/jongalloway/asp-net-mvc-routing-intercepting-file-requests-like-index-html-and-什么教程 - 关于如何路由工作 [ ^ ]
http://stackoverflow.com/questions/9331516/asp-net-mvc-routing-add-html-extension-to-routes [ ^ ]
希望这有帮助
Hello Developers,
I am working on url rewritting,
where I want to run .html extension pages
eg. www.xyz.com/abc.html
Here, I am able to run the page with the pattern
{controller}/{action}/{parameter}
But I want to run the page with extension and
exact in the above example manner.
domain/{name}.html
{name} - could be anything.
And I want this {name} in controller's ActionResult,
so I can call the store procedure to find appropriate result.
Please help developers....
Thanks in advance.
try this links
http://weblogs.asp.net/jongalloway/asp-net-mvc-routing-intercepting-file-requests-like-index-html-and-what-it-teaches-about-how-routing-works[^]
http://stackoverflow.com/questions/9331516/asp-net-mvc-routing-add-html-extension-to-routes[^]
Hope this helps
这篇关于处理MVC中的.html页面扩展的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!