用波浪线“〜”根路径不会改变大写小写 [英] Root path with tilde “~” does not change upper case to lower case

查看:411
本文介绍了用波浪线“〜”根路径不会改变大写小写的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有我的项目设置与虚拟路径/ MyVirtualPath,在IIS 6中(W2003)创建虚拟目录和一切工作正常。

然后,以更好地与谷歌Analytics(分析)工作,我改变虚拟路径/ myvirtualpath和更改所有redicecciones并链接到小写。也适用于类小写路线网址ASPNET MVC 和完美的作品。

我不得不修改IIS中的虚拟目录,删除虚拟路径/ MyVirtualPath我创造了新的/ myvirtualpath,但在所有情况下,我用波浪线〜,或在那里我做一个RedirecToAction问题(应该采取LowercaseRoute),继续保持该虚拟路径/ MyVirtualPath

例如,如果我看到的HTML源代码code在浏览器中看到的不是/MyVirtualPath/Content/Site.css/myvirtualpath/Content/Site.css。

感谢


解决方案

  1. 确保以重置IIS(运行IISRESET)当你做出这样的改变。有时有缓存的问题。

  2. 尝试直接搜索你的元数据库文件为MyVirtualPath,并手工编辑。这是一个危险和丑陋的技术,所以采取适当的precautions在这样做之前(例如,确保服务器配置为自动备份您的数据库和重新加载它,如果你陷入困境)。虽然改变的情况不大可能破坏任何东西。

I have my project set up with the virtual path "/MyVirtualPath", create the virtual directory in IIS 6 (W2003) and everything works fine.

Then to work better with Google Analytics I change the virtual path "/myvirtualpath" and change all redicecciones and links to lowercase. also applies the class "lowercase route urls in aspnet mvc" and works perfectly.

The problem I had to modify the virtual directory in IIS, delete virtual path "/MyVirtualPath" and I created the new "/myvirtualpath", but in all cases I use tilde "~" or where I make a "RedirecToAction" (which should take "LowercaseRoute"), continues to maintain the virtual path "/MyVirtualPath".

For example, if I see the HTML source code in the browser, see "/MyVirtualPath/Content/Site.css" instead of "/myvirtualpath/Content/Site.css. "

Thanks

解决方案

  1. Make sure to reset IIS (run iisreset) when you make changes like this. Sometimes there are caching issues.
  2. Try searching your metabase file directly for "MyVirtualPath" and editing it by hand. This is a dangerous and ugly technique, so take proper precautions before doing so (e.g., make sure the server is configured to automatically backup your metabase and reload it if you mess up). Though changing case is unlikely to break anything.

这篇关于用波浪线“〜”根路径不会改变大写小写的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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