需要指向www root之外的文件 [英] Need to point to files outside the www root

查看:153
本文介绍了需要指向www root之外的文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的问题如下,我在窗口服务器上运行一个网站。这些网站位于以下目录中。 'c:/ inetpub / wwwroot /'.



最近c驱动器变得非常满,因为其中一个网站允许用户将文件上传到这个位置'c: / inetpub / wwwroot / mywebsite / recordings /'.



我想将这个录音文件夹移动到服务器上的e驱动器上,该驱动器有很多空间'e:/ mywebsite_data / recordings /'



我创建了这个文件夹并将文件移动到电子驱动器上的新位置。



<我的问题是我无法创建这个新位置上的文件的超链接。我在下面尝试了这个href,但显然这是在我自己的工作站上寻找一个文件。

 < a href =E :\mywebsite_data\recordings\F1301210919031721005a.wav>记录< / A> 

有任何建议吗?



谢谢

解决方案

您可以通过创建虚拟目录来解决您的问题



在IIS 6.0中创建虚拟目录



这是一篇关于如何在IIS7中执行此操作的文章



了解IIS 7上的站点,应用程序和虚拟目录


My problem is as follows, I am running a website on a window server. The websites are located in the following directory. 'c:/inetpub/wwwroot/'.

The c drive has become very full recently as one of the websites allows the user to upload files to this location 'c:/inetpub/wwwroot/mywebsite/recordings/'.

I would like to move this recordings folder the e drive on the server which has lots of space 'e:/mywebsite_data/recordings/'

I created this folder and have moved the files to there new location on the e drive.

My problem is I cannot create a hyper link to the files on this new location. I have tried this href below but obviously this is looking for a file on my own workstation.

<a href="E:\mywebsite_data\recordings\F1301210919031721005a.wav">Recording</a>

Any suggestions?

Thanks

解决方案

You can solve your problem by creating a virtual directory

Creating Virtual Directories in IIS 6.0

Here is an article on how to do this in IIS7

Understanding Sites, Applications, and Virtual Directories on IIS 7

这篇关于需要指向www root之外的文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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