我被要求查看是否可以阻止Content目录作为Asp.Net MVC 3.0应用程序中url的一部分出现.例如,目前当我想在Content文件夹的子目录中查看图像时,URL如下:
http://localhost:[port]/Content/sub/test.bmp
Run Code Online (Sandbox Code Playgroud)
虽然我们希望将其显示如下:
http://localhost:[port]/sub/test.bmp
Run Code Online (Sandbox Code Playgroud)
Test.bmp仍然存在于服务器上Content文件夹的子目录中,我们只想隐藏Content部分.
有什么建议?我可以看到屏蔽控制器但不是目录的方法.
| 归档时间: |
|
| 查看次数: |
2845 次 |
| 最近记录: |