The only way that I know how to do this (but I could be wrong), is to use the "Alias" directive in the httpd.conf file. Basically, you can re-write a directory to point anywhere you want. Example, if you wanted your images directory to exist someplace special (like on your D: drive), you could use this code in the httpd.conf:
- Code: Select all
alias /images D:/Images
Make sure that you note the slash direction. This is opposite the usual Windows slash.
That would mean that if you went to localhost/images, it would be server out of that images directory on the D: drive. More info on this can be found
here.
The other thing that you will likely have to do, it allow access to the directory that you are using. Once again using your example, you also need to add this into the httpd.conf file:
- Code: Select all
<Directory "D:/Images">
AllowOverride None
Options None
Order allow,deny
Allow from all
</Directory>
I don't know of any other way to do it than that. I will also note that this takes effect across all sites you are hosting.
--
Dan