• Resolved drlundgren

    (@drlundgren)


    While the current anti-hotlinking works for the generic case, I think it should be specific to the jobpost data. The following patch keeps the plugin focused on it’s own data

    index a552241..7451f2c 100755
    --- a/includes/class-simple-job-board-rewrite.php
    +++ b/includes/class-simple-job-board-rewrite.php
    @@ -94,13 +94,15 @@ class Simple_Job_Board_Rewrite
             if ( $allowed_extensions ) {
                 /* Retrieve String from Array Separated by |  */
                 $hotlink_extension = implode ( '|', $allowed_extensions );
    +            $uploads_dir       = wp_upload_dir();
    +            $uploads_url_path  = parse_url($uploads_dir['baseurl'], PHP_URL_PATH);
    
                 /* Anti Hotlinking Rules */
                 $rules = "<IfModule mod_rewrite.c>\n"
                         . "RewriteEngine On\n"
                         . "RewriteCond %{HTTP_REFERER} !^$\n"
                         . "RewriteCond %{HTTP_REFERER} !^" . $site_url . ".*$ [NC]\n"
    -                    . "RewriteRule \.(" . $hotlink_extension . ")$ [R=302,L]\n"
    +                    . "RewriteRule {$uploads_url_path}/jobpost/.*?\.(" . $hotlink_extension . ")$ [R=302,L]\n"
                         . "</IfModule>\n";
    
                 return $rules;

    https://www.ads-software.com/plugins/simple-job-board/

Viewing 1 replies (of 1 total)
  • Plugin Author PressTigers

    (@presstigers)

    Hi drlundgren,

    Thank you very much for your valuable contribution.

    We will definitely update anti-hotlinking rules in next release of Job Board.

    Thanks & Regards,
    PressTigers

Viewing 1 replies (of 1 total)
  • The topic ‘Anti hotlinking rules break other downloads’ is closed to new replies.