Skip to main content
  Thursday, June 04 2020
  2 Replies
  1.9K Visits
  Subscribe
Hi JoomUnited-team!

I'm running WordPress in combination with Cloudflare CDN. I'd like to prevent hotlinking on my site. My prefered solution is to use Cloudflare's hotlink-protection:
https://support.cloudflare.com/hc/en-us/articles/200170026-Understanding-Cloudflare-Hotlink-Protection

As I have some files that I'd like to exclude from hotlinking, I could place them into a folder called "hotlink-ok", which would then be excluded from Cloudflare's hotlink protection. But that doesn't work with WP Media Folder, as it only displays the contents of wp-content/uploads but no physical folders underneath that. So it is not possible to link to those files located in "hotlink-ok". Synchronizing files from WP Media Folder to "hotlink-ok" folder on my server doesn't help either. I'm aware of the 3rd-party plugin "WP Media Folders" but this one would sync all of my folders to wp-contents/uploads, which I don't want.

Is there an option to display the contents of physical folders underneath "uploads" in WP Media Folder? This would allow to set links to files located in "hotlink-ok".

Thanks,

Kai
A
3 years ago
Hi,

Thanks for contacting us here about this extension.

I'm running WordPress in combination with Cloudflare CDN. I'd like to prevent hotlinking on my site. My prefered solution is to use Cloudflare's hotlink-protection:
https://support.cloudflare.com/hc/en-us/articles/200170026-Understanding-Cloudflare-Hotlink-Protection

As I have some files that I'd like to exclude from hotlinking, I could place them into a folder called "hotlink-ok", which would then be excluded from Cloudflare's hotlink protection. But that doesn't work with WP Media Folder, as it only displays the contents of wp-content/uploads but no physical folders underneath that. So it is not possible to link to those files located in "hotlink-ok". Synchronizing files from WP Media Folder to "hotlink-ok" folder on my server doesn't help either. I'm aware of the 3rd-party plugin "WP Media Folders" but this one would sync all of my folders to wp-contents/uploads, which I don't want.

Is there an option to display the contents of physical folders underneath "uploads" in WP Media Folder? This would allow to set links to files located in "hotlink-ok".


We can currently sync folders inside these folders: wp-admin, wp-content and wp-includes.

Please go here for more details:
https://www.joomunited.com/wordpress-documentation/wp-media-folder/200-wp-media-folder-configuration#toc-5-server-folder-sync

Hope it helps!
Kind regards,
D
Hi,

There is no good solution because of the WordPress way to handle media.
WP Media Folders would be the only alternative but if you don't want to use the folder structure for all your media you'll have to edit the plugin file.

You can remove the following code in the classes/wp-media-folders.php file

// Include WP Media Folder by Joomunited Integration
if (defined('WPMF_TAXO')) {
include_once 'wpmf.php';
new WPMediaFoldersWPMF();
}


It should remove the WP Media Folder feature letting you set manually folders.

Please make a backup of you site before doing it, to be sure this wont break anything.

Best regards
  • Page :
  • 1
There are no replies made for this post yet.