在 Umbraco 中无法浏览到没有扩展名的节点/文件夹名称
我正在使用 IIS7 和 Umbraco 4 运行客户端站点,但在浏览具有无扩展名 URL 的页面时遇到问题。
该网站运行多种语言,这些语言由 Umbraco 文件夹分隔。我想要做的是对所有站点使用主域 (.com),并使用缩写的国家/地区名称请求特定的域,即 mydomain.com/es(对于西班牙站点)。问题是我只能使用 .aspx 扩展名(即 mydomain.com/es.aspx)访问该页面,如果没有扩展名,我会收到 404 错误。
有人建议我将我请求的页面添加为 IIS 中的默认文档,但这不起作用。
我还尝试将“umbracoHideTopLevelNodeFromPath”值设置为 false,但这没有什么区别。
系统将在完成后迁移到客户端服务器,因此我真的不想在 IIS 中添加 URL 重写规则,那么是否有任何我错过的内容可以让我执行此操作?
谢谢
I'm using IIS7 and Umbraco 4 to run a clients site but I'm having issues browsing to pages with extensionless URLS.
The site is running several languages which are separated by Umbraco Folders. What I want to do is use the primary domain (.com) for all sites and request a specific one using the abbreviated country name i.e. mydomain.com/es (for spanish site). The trouble is I can only access the page by using the .aspx extension i.e. mydomain.com/es.aspx and without the extension i get a 404 error.
It's been suggested that I add the page I am requesting as a default dosument in IIS but this has not worked.
I've also tried setting the "umbracoHideTopLevelNodeFromPath" value to false but this makes no difference.
The system will be migrated to the clients servers once complete so I don't really want to add URL rewriting rules within IIS so is there anything I've missed which will allow me to do this?
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
所以,你想使用目录 url 进行浏览,
这很有可能。
首先,打开你的 web.config
找到下面的行,并确保该值设置为 true
,然后,您需要在 IIS 中添加通配符映射,
您在 IIS7 中需要执行的步骤将在这篇文章中进行解释:
[http://learn.iis.net/page.aspx/508/wildcard-script-mapping-and-iis-7-integrated-pipeline/][1]
如果您需要在 上执行此操作IIS6
c:\windows\microsoft.net\framework\v2.0.50727\aspnet_isapi.dll
完成
[1] : http://learn.iis.net/ page.aspx/508/wildcard-script-mapping-and-iis-7-integrated-pipeline/
so, you want to browse with directory url's then,
this is very mutch possible.
first, open your web.config
find the line below, and make sure the value is set to true
then, you will need to add a wildcard mapping in IIS
the steps you will need to take in IIS7 are explained in this post:
[http://learn.iis.net/page.aspx/508/wildcard-script-mapping-and-iis-7-integrated-pipeline/][1]
and if you would ever need to do this on IIS6
c:\windows\microsoft.net\framework\v2.0.50727\aspnet_isapi.dll
Done
[1] : http://learn.iis.net/page.aspx/508/wildcard-script-mapping-and-iis-7-integrated-pipeline/
我知道我在这方面有点晚了,但如果你想要一个不由 Umbraco 处理的目录,请尝试编辑你的 web.config。在该节点下,将文件夹名称附加到 umbracoReservedPaths 的现有值。应用程序重新启动后,您应该能够进入您的文件夹,并且它将绕过 Umbraco 处理程序。
I know I'm a bit late in this one but if you want to have a directory NOT handled by Umbraco, try editing your web.config. Under the node, append your folder name to the existing value for umbracoReservedPaths. After the application restarts, you should be able to enter your folder and it will bypass the Umbraco handler.