开发者

Root path with tilde “~” does not change upper case to lower case

开发者 https://www.devze.com 2023-02-01 14:49 出处:网络
I have my project set up with the virtual path \"/MyVirtualPath\", c开发者_如何学Goreate the virtual directory in IIS 6 (W2003) and everything works fine.

I have my project set up with the virtual path "/MyVirtualPath", c开发者_如何学Goreate 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.
0

精彩评论

暂无评论...
验证码 换一张
取 消