Forums / Setting Up Categories, Products, Attributes / 404 error for new file format download

404 error for new file format download

Views: 1,361

Results 1 to 9 of 9
3 Aug 2011, 2:43 AM
#1
nikerymis avatar

nikerymis

New Zenner

Join Date:
Oct 2009
Location:
Ohio
Posts:
19
Plugin Contributions:
0

404 error for new file format download

Hi all,

My company sells ebooks. We recently expanded into two new file formats (Mobipocket and Microsoft LIT). I had no trouble setting up the new attributes and everything seemed to set up correctly. However, when one of these new file formats is purchased and downloaded, the customer receives a 404 error.

I have updated the .htaccess in the downloads directory to include the extensions for these files, but still the error. I feel like I'm missing a (probably very simple) step to setting these up, but I can't find anything about this in the forum, the wiki, or the FAQs and tutorials.

Any ideas? Thank you for any assistance.

3 Aug 2011, 3:04 AM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: 404 error for new file format download

If you're using the default setup where Download By Redirect is enabled, then you need to add those filetypes to the .htaccess in your /pub/ folder, not the /download/ folder.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

3 Aug 2011, 3:10 AM
#3
nikerymis avatar

nikerymis

New Zenner

Join Date:
Oct 2009
Location:
Ohio
Posts:
19
Plugin Contributions:
0

Re: 404 error for new file format download

I knew I was missing something simple. That did the trick, thank you very much!

7 Nov 2011, 5:13 PM
#4
lexxymark avatar

lexxymark

New Zenner

Join Date:
Mar 2008
Posts:
9
Plugin Contributions:
0

Re: 404 error for new file format download

DrByte:

If you're using the default setup where Download By Redirect is enabled, then you need to add those filetypes to the .htaccess in your /pub/ folder, not the /download/ folder.

Where can I find the code to do this? thx- Amy

7 Nov 2011, 11:04 PM
#5
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: 404 error for new file format download

Amy,
I'm not sure exactly what your question is. The text you quoted already appears to answer the question.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

8 Nov 2011, 12:53 AM
#6
lexxymark avatar

lexxymark

New Zenner

Join Date:
Mar 2008
Posts:
9
Plugin Contributions:
0

Re: 404 error for new file format download

Thanks for the reply. I thought I was asking what code needs to be in .htaccess so customers can download that particular kind of file (in my case a zip or pdf).

I'm trying to offer downloads and i've followed all of the directions in the tutorials for downloads and everything works great (file is there in the cart, on the confirmation page, etc, until i click the download button on a test purchase and I get a "file does not exist" error. File is definitely there in the downloads folder and the permission is set correctly.

Trying to troubleshoot and this seemed like it could be the answer because I have Magic SEO installed which altered my .htaccess so I thought that maybe something was missing.

8 Nov 2011, 2:58 AM
#7
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: 404 error for new file format download

  1. Did you test deleting all traces of the "Magic SEO" addon and see whether that suddenly fixes the problem? If it does, then you need to decide what to do about using that addon.

  2. The .htaccess referred to in this thread is the one in the /pub/ folder. And .zip and .pdf should already be supported if you've properly installed the latest version of Zen Cart. The Magic SEO addon should NOT have touched that .htaccess file. If it did, then that's just one more huge strike against it.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

8 Nov 2011, 2:28 PM
#8
lexxymark avatar

lexxymark

New Zenner

Join Date:
Mar 2008
Posts:
9
Plugin Contributions:
0

Re: 404 error for new file format download

by /pub you mean /public_html correct?

sounds like i have some work to (un)do.

thx.

8 Nov 2011, 5:09 PM
#9
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: 404 error for new file format download

No. I meant /pub.

Zen Cart does NOT come with a /public_html/.htaccess file. That would be something you added yourself, perhaps from an addon, or directly on your own.
Zen Cart DOES come with /public_html/pub/.htaccess, which shouldn't need any tampering under normal circumstances.

None of the .htaccess supplied by Zen Cart have anything to do with Magic SEO.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.