Viewing 15 replies - 31 through 45 (of 72 total)
  • Plugin Contributor Pippin Williamson

    (@mordauk)

    No, I was asking if you have a development/staging version of your site (a second instance of your site) that can be used for safely testing?

    I have only been able to replicate this issue in one instance, and that was only when running on a server using nginx, not apache.

    Thread Starter giganut

    (@giganut)

    I backed everything up and updated the plug in, so far everything seems to be working fine, I will report back in the morning and let you know if everything is still working or not.

    Thanks,

    Plugin Contributor Pippin Williamson

    (@mordauk)

    Great!

    Thread Starter giganut

    (@giganut)

    My site started to do it again.

    Plugin Contributor Pippin Williamson

    (@mordauk)

    IT’s not possible for EDD to just start doing something like this. Something has to have changed.

    Any plugin updates? Server updates? Theme updates?

    Thread Starter giganut

    (@giganut)

    The only change was me upgrading EDD plug in again, Remember I had reverted back to the previous version.

    Plugin Contributor Pippin Williamson

    (@mordauk)

    Yes but yesterday you said you upgraded and it worked perfectly fine, so what happened between now and then?

    Thread Starter giganut

    (@giganut)

    Nothing at all no updates, what should the .htaccess look like, is this right? I remember it was something different before.

    Options -Indexes
    deny from all
    <FilesMatch '\.(jpg|png|gif)$'>
    Order Allow,Deny
    Allow from all
    </FilesMatch>
    Thread Starter giganut

    (@giganut)

    Ok I just go it working again, this is what I did, I edited the .htaccess like this.

    Original before the edit was made

    Options -Indexes
    deny from all
    <FilesMatch '\.(jpg|png|gif)$'>
    Order Allow,Deny
    Allow from all
    </FilesMatch>

    This is what I changed it to and now it’s working again

    Options -Indexes
    Thread Starter giganut

    (@giganut)

    Ok something really strange is happening here, when I change the .htaccess to this

    Options -Indexes

    And then upload a new file the .htaccess file changes back to this

    Options -Indexes
    deny from all
    <FilesMatch '\.(jpg|png|gif)$'>
    Order Allow,Deny
    Allow from all
    </FilesMatch>

    And then the download links give a 404 error again.

    Plugin Contributor Pippin Williamson

    (@mordauk)

    That’s because EDD does that intentionally to ensure the file does not get accidentally deleted. To fix it, do this instead:

    function pw_edd_htaccess_rules( $rules ) {
    	return 'Options -Indexes';
    }
    add_filter( 'edd_protected_directory_htaccess_rules', 'pw_edd_htaccess_rules' );

    Place that in your theme’s functions.php or a custom plugin.

    Thread Starter giganut

    (@giganut)

    Will this work?

    <?php
    
    // Exit if accessed directly
    if ( !defined('ABSPATH')) exit;
    
    /**
     *
     * WARNING: Please do not edit this file in any way
     *
     * load the theme function files
     */
    require ( get_template_directory() . '/includes/functions.php' );
    require ( get_template_directory() . '/includes/theme-options.php' );
    require ( get_template_directory() . '/includes/post-custom-meta.php' );
    require ( get_template_directory() . '/includes/tha-theme-hooks.php' );
    require ( get_template_directory() . '/includes/hooks.php' );
    require ( get_template_directory() . '/includes/version.php' );
    
    function pw_edd_htaccess_rules( $rules ) {
    	return 'Options -Indexes';
    }
    add_filter( 'edd_protected_directory_htaccess_rules', 'pw_edd_htaccess_rules' );
    Plugin Contributor Pippin Williamson

    (@mordauk)

    Yep!

    Thread Starter giganut

    (@giganut)

    My site sent me to a 404 forbidden .htaccess warning after putting the code in the file, so I had to remove it. please can you point me in the right direction to find a good tutorial to make a custom plugin. or how much to have you do it for me?

    Thread Starter giganut

    (@giganut)

    is this included in the change log of the new update?

Viewing 15 replies - 31 through 45 (of 72 total)
  • The topic ‘All Download Links Get 404 Errors After Updates today’ is closed to new replies.