Hi,
For what you want to do, i.e. from a local site located on disk C: to be able to load videos located on disk D:, we can consider that there are two possible solutions.
But in all cases, it is imperative to have defined the local site as VirtualHost, which in your case should be :
<VirtualHost *:80>
ServerName mysite
DocumentRoot "e:/wamp64/www/mysite"
<Directory "e:/wamp64/www/mysite/">
Options +Indexes +Includes +FollowSymLinks +MultiViews
AllowOverride All
Require local
</Directory>
</VirtualHost>
Note: You replace the paths with your own, my Wampserver is on e:, not on c:
- The first solution is the use of an Alias.
An Alias with name "myvideos", when used in a link or a url, will be replaced by the path defined in this Alias
Alias should be:
Alias /myvideos d:/movies
<Directory "d:/movies">
Options +Indexes +FollowSymLinks
AllowOverride All
Require local
</Directory>
This indicates that when the http protocol encounters "myvideos" in a path, it will be replaced by the actual path d:/movies.
If you are creating an Alias to a directory outside of your DocumentRoot, you may need to explicitly permit access to the target directory.
This code for the alias must be saved in a text file c:\wamp64\alias\myvideos.conf
In order for the VirtualHost and the alias to be taken into account, you must either restart Wampserver or Right-Click -> Refresh.
Now in a page of your local mysite site, the following code:
<video width='720' height='405' title='Test of video from an alias' poster='' controls>
<source src='myvideos/file.mp4' type='video/mp4'>
</video>
will load the video file located at d:/movies/file.mp4
- The second solution is the use of jonction.
And, in this case there is no more need for Alias, so we must delete the file myvideos.conf
A jonction is a symbolic link that points to a folder outside its location and even to another disk.
A jonction causes the pointed folder to be seen as being located in the folder where the jonction is.
So, in the folder e:/wamp64/www/mysite, we will create a junction with the name "myvideos" pointing to d:\movies.
In a command window launched "As administrator" (The word administrator must be in the title bar), let's position ourselves in the folder e:\wamp64\www\mysite then let's create the junction by the command mklink
C:\Windows\system32>cd /d e:\wamp64\www\mysite
e:\wamp64\www\mysite>mklink /J myvideos d:\movies
Connection created for myvideos <<===>> d:\movies
Here also, after that, the code
<video width='720' height='405' title='Test of video from an alias' poster='' controls>
<source src='myvideos/file.mp4' type='video/mp4'>
</video>
will load the video file located at d:/movies/file.mp4
---------------------------------------------------------------
Documentation Apache -
Documentation PHP -
Documentation MySQL -
Wampserver install files & addons