.htaccess Problem

Discussion in 'aMember Pro v.4' started by scottlott, Jul 11, 2013.

  1. scottlott

    scottlott Member

    Joined:
    Jun 17, 2010
    Messages:
    50
    Hey guys,
    I'm trying to set up a WebGL based javascript application that runs inside an .htaccess protected section of aMember.

    When I run the application from inside the aMember protected folder, none of the texture images load. Instead, an error is reported in the console for each image load attempt:

    Code:
    Resource interpreted as Image but transferred with MIME type text/html
    When I run the javascript application outside of an aMember protected folder or locally everything works perfectly.

    I've done some reading and learned that the issue is from the .htaccess file, I've even tried adding these lines to the .htaccess file:

    Code:
    AddDefaultCharset UTF-8
    AddType image/gif .gif
    AddType image/jpeg .jpeg .jpg
    But it hasn't helped at all.

    What lines do I need to add to the .htaccess file so that I can load .jpg files using relative paths?
  2. scottlott

    scottlott Member

    Joined:
    Jun 17, 2010
    Messages:
    50
    I figured out a work around that at least gets things working.

    I set things up so that the textures are loaded *outside* the htaccess protected area. It means the textures aren't protected, but at least the scripts containing the useful code are.

    If anyone has a solution that includes putting the textures inside the htaccess area I'd appreciate the input.

    Thanks.
  3. accularian

    accularian Online Macintosh support — aMember Guru.

    Joined:
    Dec 12, 2006
    Messages:
    41
    Scott,

    You may need to add a bit more code to your .htaccess file. This is only a guess...

    AddType application/javascript js jsonp
    AddType application/json json



    Let us know if it works.
    Warm regards,

    [​IMG]


    Dana Haynes

    Accularian Video Training
    6805 W. Commercial Blvd. #174
    Tamarac, Florida 33319
    954-726-9525
    Come learn the secrets of the Macintosh!
    Free video tutorials at http://www.accularian.com/lps/em/
  4. miso

    miso aMember Pro Customer

    Joined:
    Aug 22, 2006
    Messages:
    543

Share This Page