带有波浪号的根路径 “~”不将大写更改为小写

发布于 2024-10-10 05:00:31 字数 570 浏览 0 评论 0原文

我的项目设置了虚拟路径“/MyVirtualPath”,在 IIS 6 (W2003) 中创建虚拟目录,一切正常。

然后,为了更好地使用 Google Analytics,我更改了虚拟路径“/myvirtualpath”,并将所有 redicecciones 和链接更改为小写。还应用类“aspnet mvc 中的小写路由 url< /a>”并且工作完美。

问题我必须修改 IIS 中的虚拟目录,删除虚拟路径“/MyVirtualPath”并创建新的“/myvirtualpath”,但在所有情况下我都使用波形符“~”或在其中创建“RedirecToAction”(应该采取“LowercaseRoute”),继续维护虚拟路径“/MyVirtualPath”。

例如,如果我在浏览器中看到 HTML 源代码,请参阅“/MyVirtualPath/Content/Site.css”而不是“/myvirtualpath/Content/Site.css”。

谢谢

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

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

叫思念不要吵 2024-10-17 05:00:31
  1. 当您进行此类更改时,请确保重置 IIS(运行 iisreset)。有时会出现缓存问题。
  2. 尝试直接在元数据库文件中搜索“MyVirtualPath”并手动编辑它。这是一种危险且丑陋的技术,因此在这样做之前请采取适当的预防措施(例如,确保服务器配置为自动备份您的元数据库,并在出现问题时重新加载它)。尽管改变大小写不太可能破坏任何东西。
  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.
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文