共享主机上的ASP.NET MVC Extension-Less URLS? (GoDaddy等)

时间:2022-07-13 01:49:38

Is it possible to have extension-less URLs (ASP.NET MVC default) with shared hosting? I have seen some things to get GoDaddy working by including the .aspx extension in the Global.asax routing, however I don't want my URLs to include .aspx.

是否可以通过共享主机获得无扩展名的URL(ASP.NET MVC默认值)?通过在Global.asax路由中包含.aspx扩展,我看到了GoDaddy工作的一些事情,但是我不希望我的URL包含.aspx。

3 个解决方案

#1


Yes, I have a couple sites that are currently hosted on GoDaddy shared w/ extensionless URLs in ASP.NET. You need to enable IIS7 integrated pipeline mode as you can't access wildcard mappings or add ISAPI filters on a shared box. Once that's turned on, you can route incoming (extensionless) URLs to .aspx or whatever else through an HTTP Module or via URLRewriter.NET or whatever else.

是的,我有几个网站目前托管在GoDaddy上与ASP.NET中的无扩展名URL共享。您需要启用IIS7集成管道模式,因为您无法访问通配符映射或在共享框上添加ISAPI筛选器。一旦打开,您就可以通过HTTP模块或URLRewriter.NET或其他任何方式将传入(无扩展名)URL路由到.aspx或其他任何内容。

Good luck.

#2


It sounds like they are using IIS6 (or IIS5 even), which means you'll have to ask them to make some changes to the server settings or install an ISAPI filter to get extensionless routing. I don't think that's going to happen, especially with GoDaddy, so you are better off looking for someone who offers IIS7 hosting.

听起来他们正在使用IIS6(或IIS5甚至),这意味着您必须要求他们对服务器设置进行一些更改或安装ISAPI过滤器以获得无扩展路由。我不认为这会发生,特别是GoDaddy,所以你最好找一个提供IIS7托管的人。

#3


Check this out.

看一下这个。

http://weblogs.asp.net/scottgu/archive/2007/02/26/tip-trick-url-rewriting-with-asp-net.aspx

This says how to do it in a hosted environment.

这说明如何在托管环境中执行此操作。

#1


Yes, I have a couple sites that are currently hosted on GoDaddy shared w/ extensionless URLs in ASP.NET. You need to enable IIS7 integrated pipeline mode as you can't access wildcard mappings or add ISAPI filters on a shared box. Once that's turned on, you can route incoming (extensionless) URLs to .aspx or whatever else through an HTTP Module or via URLRewriter.NET or whatever else.

是的,我有几个网站目前托管在GoDaddy上与ASP.NET中的无扩展名URL共享。您需要启用IIS7集成管道模式,因为您无法访问通配符映射或在共享框上添加ISAPI筛选器。一旦打开,您就可以通过HTTP模块或URLRewriter.NET或其他任何方式将传入(无扩展名)URL路由到.aspx或其他任何内容。

Good luck.

#2


It sounds like they are using IIS6 (or IIS5 even), which means you'll have to ask them to make some changes to the server settings or install an ISAPI filter to get extensionless routing. I don't think that's going to happen, especially with GoDaddy, so you are better off looking for someone who offers IIS7 hosting.

听起来他们正在使用IIS6(或IIS5甚至),这意味着您必须要求他们对服务器设置进行一些更改或安装ISAPI过滤器以获得无扩展路由。我不认为这会发生,特别是GoDaddy,所以你最好找一个提供IIS7托管的人。

#3


Check this out.

看一下这个。

http://weblogs.asp.net/scottgu/archive/2007/02/26/tip-trick-url-rewriting-with-asp-net.aspx

This says how to do it in a hosted environment.

这说明如何在托管环境中执行此操作。