{"id":31303,"date":"2014-08-25T08:46:09","date_gmt":"2014-08-25T08:46:09","guid":{"rendered":"https:\/\/wordpress.org\/plugins-wp\/hotlink-file-prevention\/"},"modified":"2024-04-15T22:00:04","modified_gmt":"2024-04-15T22:00:04","slug":"hotlink-file-prevention","status":"publish","type":"plugin","link":"https:\/\/azb.wordpress.org\/plugins\/hotlink-file-prevention\/","author":8005907,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","version":"2.0.0","stable_tag":"2.0.0","tested":"6.5.8","requires":"4.6","requires_php":"5.6","requires_plugins":null,"header_name":"Hotlink File Prevention","header_author":"Greg Perham","header_description":"","assets_banners_color":"","last_updated":"2024-04-15 22:00:04","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"","header_author_uri":"https:\/\/github.com\/swinggraphics","rating":4.9,"author_block_rating":0,"active_installs":700,"downloads":7893,"num_ratings":7,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":{"1.0.1":{"tag":"1.0.1","author":"electricmill","date":"2014-09-04 15:46:56"},"1.1.0":{"tag":"1.1.0","author":"swinggraphics","date":"2020-12-14 18:06:14"},"2.0.0":{"tag":"2.0.0","author":"swinggraphics","date":"2024-04-15 22:00:04"}},"upgrade_notice":{"2.0.0":"<ul>\n<li>Actually works with multiple files now<\/li>\n<li>Works cleanly when deactivated and reactivated<\/li>\n<\/ul>","1.1.0":"<ul>\n<li>Updated to work with newer versions of WordPress.<\/li>\n<\/ul>"},"ratings":{"1":0,"2":0,"3":0,"4":1,"5":6},"assets_icons":{"icon.svg":{"filename":"icon.svg","revision":2439255,"resolution":false,"location":"assets","locale":false}},"assets_banners":[],"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.0.1","1.1.0","2.0.0"],"block_files":[],"assets_screenshots":{"screenshot-1.jpg":{"filename":"screenshot-1.jpg","revision":2439255,"resolution":"1","location":"assets","locale":""}},"screenshots":{"1":"Checkbox in the file edit dialog"},"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[83,1346,88,6462,163],"plugin_category":[50],"plugin_contributors":[95733,144826],"plugin_business_model":[],"class_list":["post-31303","plugin","type-plugin","status-publish","hentry","plugin_tags-admin","plugin_tags-attachments","plugin_tags-files","plugin_tags-hotlink","plugin_tags-images","plugin_category-media","plugin_contributors-electricmill","plugin_contributors-swinggraphics","plugin_committers-electricmill","plugin_committers-swinggraphics"],"banners":[],"icons":{"svg":"https:\/\/ps.w.org\/hotlink-file-prevention\/assets\/icon.svg?rev=2439255","icon":"https:\/\/ps.w.org\/hotlink-file-prevention\/assets\/icon.svg?rev=2439255","icon_2x":false,"generated":false},"screenshots":[{"src":"https:\/\/ps.w.org\/hotlink-file-prevention\/assets\/screenshot-1.jpg?rev=2439255","caption":"Checkbox in the file edit dialog"}],"raw_content":"<!--section=description-->\n<p>Hotlink File Prevention (HFP) offers simple hotlink protection that can be turned on\/off for individual files in the WordPress media library.<\/p>\n\n<p>\"Hotlinking\" is when a file, such as an image or PDF, is linked to from another website or entered manually in a web browser's location bar. HFP only allows your file to be viewed on your website.<\/p>\n\n<p>Hotlink protection is provided via <code>.htaccess<\/code> rules in the <code>wp-content\/uploads<\/code> directory.<\/p>\n\n<h3>Basic Usage<\/h3>\n\n<p>Once the HFP plugin is activated, you will have two new features in the media library:<\/p>\n\n<ol>\n<li>Within the Screen Options tab (list view only), check box for the \"Hotlink Prevention\" column.<\/li>\n<li>To protect a file, edit the file and scroll down to the checkbox labelled \"Hotlink Protection\".<\/li>\n<\/ol>\n\n<p>Any asset that is checked will have \"Yes\" displayed in the \"Hotlink Prevention\" column; otherwise, this column will be blank.<\/p>\n\n<h4>Note about \"Open in new tab\" option<\/h4>\n\n<p>When you use the \"Open in new tab\" option for links, WordPress adds <code>rel=\"noreferrer\"<\/code>, which effectively makes the link act like direct access, and the link will be blocked for files protected using HFP.<\/p>\n\n<!--section=installation-->\n<ol>\n<li>Go to \"Plugins &gt; Add New\" in the WordPress admin area.<\/li>\n<li>Search for \"Hotlink File Prevention\".<\/li>\n<li>Install, then Activate the plugin.<\/li>\n<\/ol>\n\n<p>For more installation options and instructions, see <a href=\"https:\/\/wordpress.org\/support\/article\/managing-plugins\/#installing-plugins\">\"Installing Plugins\" on WordPress.org<\/a>.<\/p>\n\n<!--section=faq-->\n<dl>\n<dt id='how%20does%20hfp%20work%3F'><h3>How does HFP work?<\/h3><\/dt>\n<dd><p>HFP creates an Apache <code>.htaccess<\/code> file in the <code>wp-content\/uploads<\/code> directory. It sets a HTTP_REFERER check and RewriteRule for each file that has hotlink protection applied. Toggling hotlink protection on\/off dynamically adds\/removes RewriteRule statements.<\/p><\/dd>\n<dt id='can%20it%20be%20used%20with%20any%20type%20of%20media%20file%3F'><h3>Can it be used with any type of media file?<\/h3><\/dt>\n<dd><p>Yes, it works with any file that you upload to the media library.<\/p><\/dd>\n<dt id='are%20my%20files%20absolutely%20safe%20using%20this%20plugin%3F'><h3>Are my files absolutely safe using this plugin?<\/h3><\/dt>\n<dd><p>Here's the deal: This plugin makes it harder for people to hotlink to your files, but if they are highly technical, they will be able to do things like fake the HTTP referrer.<\/p><\/dd>\n<dt id='does%20it%20with%20with%20web%20servers%20other%20than%20apache%3F'><h3>Does it with with web servers other than Apache?<\/h3><\/dt>\n<dd><p>The server must process rewrite rules in <code>.htaccess<\/code>. So HFP will work on Apache and LightSpeed servers, but not NGINX.<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>2.0.0<\/h4>\n\n<ul>\n<li>Track protected files in wp_options table instead of individual post meta<\/li>\n<li>Fixed htaccess rules to work with multiple protected files<\/li>\n<li>Use insert_with_markers() to handle writing to htaccess<\/li>\n<li>Added CSS for media library table column<\/li>\n<li>Added uninstall hook<\/li>\n<\/ul>\n\n<h4>1.1.0<\/h4>\n\n<ul>\n<li>Modernized the code, and got it working again!<\/li>\n<li>Updated README<\/li>\n<li>Changed some strings, and made them translation-ready<\/li>\n<li>Moved Hotlink Protection column before Date<\/li>\n<li>Added deactivation hook to remove htaccess file<\/li>\n<\/ul>\n\n<h4>1.0.1<\/h4>\n\n<ul>\n<li>commented out error reporting<\/li>\n<li>now uses just filename (followed by full path and name) in .htaccess; previously this was full path and location alone. Version 1.0.0 users should delete .htaccess from \/uploads directory and rebuild file by clicking \"update\" on any file in Media Library that has \"Yes\" for Hotlink File Prevention.<\/li>\n<\/ul>\n\n<h4>1.0.0<\/h4>\n\n<ul>\n<li>Development version and Alpha release.<\/li>\n<\/ul>","raw_excerpt":"Simple hotlink protection for individual files in the media library.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/azb.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/31303","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/azb.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/azb.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/azb.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=31303"}],"author":[{"embeddable":true,"href":"https:\/\/azb.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/swinggraphics"}],"wp:attachment":[{"href":"https:\/\/azb.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=31303"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/azb.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=31303"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/azb.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=31303"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/azb.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=31303"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/azb.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=31303"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/azb.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=31303"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}