Support » Plugin: Email Before Download » Download Link Sends Users to a 404 Page Instead of the Direct Download Link

  • Using the latest version of Chrome as a browser, I have set up Email-Before-Download (Version 3.4 | By M&S Consulting) according to best practices and directions to work with both the latest versions of Download Monitor (Version 1.9.7 | By Never5) and Contact Forms 7 (Version 4.9 | By Takayuki Miyoshi).

    In the Email-Before-Download plugin, I am using the “both” delivery format (email and inline link): the inline link target is “_blank”, I have tried the Hide/Mask Real Link checkbox (both selected and unselected with no change in result, and all other options I left at their default settings. Within the WP Download Monitor plugin, I uploaded the PDF file to WP Media Library using the “add file” function and then I also tried to upload via the “browse for file” function. (Neither way of adding the PDF causes a different result).

    I have used the appropriate IDs for the shortcode [email-download download_id=”X” contact_form_id=”Y”]. In my case the IDs are: [email-download download_id=”1075″ contact_form_id=”1021″].

    Everything seems to be in order and working correctly, EXCEPT,

      the final file link that is generated after someone completes the simple form, takes them to a 404 page instead of the download.

    This is the page where the form resides:

    This is the direct link to the PDF file:

    This is the link generated by the plugin:

    Thank you for your help!!

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Did you cut’n’paste your shortcode from your wordpress page into the post above? If so, the problem appears to be the double-quotes around your ID numbers in your shortcode. Those are not normal double-quotes. They look like they may be MS-Word “smart quotes”. Notice how they curve and look different than the quotes I just put in this comment. I suggest you edit your wordpress page & make sure you are in the text-editor view rather than the HTML view and then delete the quotes and replace them with quotes you type in there yourself.

    Thread Starter rimell


    Thank you for the reply. No, the quote marks in the actual code on my page are correct. When I copied the code to this WP forum, they came out this way.

    Regardless, I followed your suggestion, but nothing has changed.

    Ok, sorry about that red herring about the quotes. I saw those curly quotes and assumed that was probably the problem without even checking anything else…now, I’ve actually tried out your page.

    First problem is that the EBD plugin files are not accessible from the Internet. Note that most WordPress plugins do not require people out on the Net to directly access the plugin files down in the wp-content/plugin directory. That’s because they normally run entirely “within” WordPress. EBD is different because the link for people to download the downloadable file is a link into the EBD plugin directory (to download.php). In your case, trying to access any PHP file in the EBD plugin directory returns a 404 Not Found — that’s the case for download.php, for checkcurl.php, etc. Accessing non-php files, like readme.txt, gives a 403 Permission Denied. That makes it pretty clear that you have some sort of security plugin (WordPress or webserver) or have your webserver configured to do this (and directory permissions may be at play as well) or some combination of that. This was probably done to “harden wordpress” .. it probably does make things a bit more secure, but just a bit. If you want to use EBD, you’ll have to fix it to (at least) allow access to download.php from the net. Here are some example URLs that don’t work, so you can see what I mean:

    these give 404 Not Found

    this gives a 403 Permission Denied:

    Now, once that is fixed things just might start working. Or, there might still be issues. Right now, if I try to access the 25-Questions-eBook.pdf directly, I get a 403 Permission Denied. That will be a problem IF you have Hide/Mask set to NO. With Hide/Mask set to Yes it might work (or might not, we’ll have to see).

    Oh, one thing I forgot to mention. I noticed that the message that appeared on the form after I submitted it said that the link to the download would expire in 1 hour. That makes me think you have Link Expiration turned on. Very few people use that … there -might- be bugs with that and certain other settings (like Hide/Mask). I can’t remember exactly. I suggest before you do anything, you first turn link expiration off, test again, then if still same problem track down the issues I talked about above. Once you get everything working, THEN turn on link expiration & retest.

    Thread Starter rimell


    Thanks @dtynan, that is a really detailed explanation! And thanks for taking the time to look into this for me. I’m afraid what you described may be too technical for me to trace down on the webserver side, where I believe the issue described might be. The only plugins I have installed on the WP side are: Contact Form 7, Download Monitor, Email-Before-Download, Google Analytics Dashboard for WP (GADWP), [the following are baked into the theme] KingComposer, Theme Support, and WPForms Lite.

    EIther way, I will take this to my IT group and see if they can lower the security on the webserver side to allow php download. Otherwise, I may have to find a different solution.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Download Link Sends Users to a 404 Page Instead of the Direct Download Link’ is closed to new replies.