Results 1 to 7 of 7
  1. #1
    Newbie Affiliate Ian's Avatar
    Join Date
    January 18th, 2005
    Posts
    1,540
    htaccess focing download of file NOT WORKING
    ok, i have a .ebk file. It is an ebook but the browser is trying to parse it when you click on a link to it. When you right click / save as, you get a default .htm extension in the download.

    My .htaccess file shoudl work but it doesn't. Any ideas?

    AddType application/octet-stream ebk

  2. #2
    Not Verif-Lidated infoTim's Avatar
    Join Date
    January 18th, 2005
    Location
    Sunny Florida
    Posts
    1,021
    When I use AddType it's always with the dot, i.e. AddType application/octet-stream .ebk

    but don't know if that makes a difference.
    Tim
    consultant by day, affiliate by night

  3. #3
    Roll Tide mobilebadboy's Avatar
    Join Date
    January 18th, 2005
    Location
    Mobile, Alabama
    Posts
    1,220
    A quick search turned up: application/x-expandedbook ebk

    That's new to me, otherwise. And yeah, I always use a (.) myself, but like infosponge, I don't know if it makes a difference. I've never tried it without it.

    Shawn Kerr (.com) | Disney World | SEC Football

  4. #4
    Newbie Affiliate Ian's Avatar
    Join Date
    January 18th, 2005
    Posts
    1,540
    I alwasy use a . as well but the web host suggested it otherwise. They even had one tier 2 peson suggest a duplicate entry as a test. Here is my file but it ain't working.... Any other ideas besides using an autoresponder to email the file to the end user?

    AddType application/x-httpd-php .html
    AddType application/x-expandedbook .ebk
    AddType application/x-expandedbook ebk
    AddType application/x-expandedbook ebk ebk
    AddType application/octet-stream ebk
    AddType application/octet-stream ebk ebk

  5. #5
    Not Verif-Lidated infoTim's Avatar
    Join Date
    January 18th, 2005
    Location
    Sunny Florida
    Posts
    1,021
    FWIW, I just tried it on my development server here and it worked fine both with and without the dot.

    I know that's not much help.
    Tim
    consultant by day, affiliate by night

  6. #6
    Not Verif-Lidated infoTim's Avatar
    Join Date
    January 18th, 2005
    Location
    Sunny Florida
    Posts
    1,021
    I'm assuming the .htaccess file has the right permissions so that Apache can read it & your host has allowed AddType overrides in an .htaccess file?
    Tim
    consultant by day, affiliate by night

  7. #7
    Newbie Affiliate Ian's Avatar
    Join Date
    January 18th, 2005
    Posts
    1,540
    Thanks for all the support people. Just to update:

    Yes, the file should have proper rights permissions as other htaccess functions work. I parse .html files.

    I finally gave up trying to use htaccess to force the download and just found out that I can use php. It works now!

    Thanks again everyone!!! I really appreciate your support!

  8. Newsletter Signup

+ Reply to Thread

Similar Threads

  1. Htaccess File Problem
    By silver93350 in forum Midnight Cafe'
    Replies: 44
    Last Post: June 24th, 2011, 03:25 PM
  2. Php Script to Download Web File Not Working
    By Uncle Rico in forum Programming / Datafeeds / Tools
    Replies: 7
    Last Post: January 19th, 2009, 01:11 PM
  3. Problem with big .htaccess file?
    By Affiliate Ian in forum Midnight Cafe'
    Replies: 2
    Last Post: August 20th, 2004, 02:40 PM
  4. .htaccess.html file...help?
    By hershey in forum Programming / Datafeeds / Tools
    Replies: 6
    Last Post: January 9th, 2002, 07:44 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •