Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Need to point to files outside the www root

Tags:

iis

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

like image 549
davesherlock Avatar asked Apr 26 '11 09:04

davesherlock


People also ask

Can PHP access files outside document root?

As long as you have the permissions set up correctly, PHP can read from any file you want inside scripts. However, unless you configure Apache to do otherwise, users will not be able to load files from outside of the document root directly through their web browser.

How do I get to the root directory of my website?

For the Grid, a website's root directory is the …/html folder. This is located in the file path /domains/example.com/html. The root directory can be viewed/accessed through File Manager, FTP, or SSH.

Which folder is the root folder of your Web application?

Typically, the default Web application root for port 80 is stored at c:\inetpub\wwwroot. A Windows SharePoint Services 2.0 installation normally took over the default Web application; therefore, the default Web application root for a SharePoint site created with Windows SharePoint Services 2.0 was located there.

How do I find virtual directory in IIS?

Hold down the Windows key, press the letter X, and then click Control Panel. Click Administrative Tools, and then double-click Internet Information Services (IIS) Manager.


2 Answers

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

like image 162
Ranhiru Jude Cooray Avatar answered Oct 26 '22 14:10

Ranhiru Jude Cooray


You can use IIS' virtual directories: https://web.archive.org/web/20110318232846/http://support.microsoft.com/kb/172138

With them you can place external folders in your website (it's like an include).


Update:

Another tutorial: http://msdn.microsoft.com/en-us/library/zwk103ab.aspx

like image 27
Albireo Avatar answered Oct 26 '22 13:10

Albireo