开发者

ASP.NET - Trailing Slash and Tilde

开发者 https://www.devze.com 2023-01-04 03:10 出处:网络
I\'ve found what seems like a bizarre problem with IIS 6.0 and .NET 3.5. I always use the tilde for all URLs (eg: ~/mypage.aspx) so if I go to mydomain.com/mypage.aspx, everything works fine. If, howe

I've found what seems like a bizarre problem with IIS 6.0 and .NET 3.5. I always use the tilde for all URLs (eg: ~/mypage.aspx) so if I go to mydomain.com/mypage.aspx, everything works fine. If, however, I add a trailing sla开发者_运维百科sh and go to mydomain.com/mypage.aspx/, all links on the page which use the tilde get rendered as mydomain.com/mypage.aspx/otherpage.aspx instead of mydomain.com/otherpage.aspx.

This happens with all controls.

Has anyone had this issue before?


mydomain.com/mypage.aspx/ is a wrong URL. By this URL it will look for mypage.aspx sub-directory. And I think it is working as expected.


You are not supposed to put a slash at the end of the page name. Why do you put that slash? The slash means a folder in the application.

0

精彩评论

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