How to accomidate virtual directories?
Posted
#6012
(In Topic #1438)
Standard member

ocPortal 9.0.41
IIS 8.5
I need to move my /uploads/downloads/ folder to another drive due to lack of capacity on the origional drive. I have duplicated the content of the /downloads/ folder to a new drive and created a virtual folder named downloads in the /uploads/ folder after renamed the old folder.
The folder URL itself is proven functional by adding a temporary index.php file to it but all download links from the site return a 404.
Can anyone help as I wish to retain this format once the site is upgraded to Composr?
TQ
Posted

Site director

The downloads are served via dload.php, which reads the filesystem, not the URLs.
Try using mklink to map uploads/downloads to your new location.
mklink | Microsoft Learn
I've never used this on a web server context, but I have used it for other things and it's worked well.
Become a fan of Composr on Facebook or add me as a friend. Add me on on Mastodon. Follow me on Minds (where I am most active). Support me on Patreon
- If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
- If so, please let others know about Composr whenever you see the opportunity or support me on Patreon.
- If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying Composr on fun personal projects.
- If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Posted
Standard member

Chris Graham said
Hi,
The downloads are served via dload.php, which reads the filesystem, not the URLs.
Try using mklink to map uploads/downloads to your new location.
mklink | Microsoft Learn
I've never used this on a web server context, but I have used it for other things and it's worked well.
From “Post #6,016”, 28th September 2019, 4:32 pm
Thank You Chris!
mklink seems to be working like a charm.
TQ
1 guest and 0 members have just viewed this.