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?
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.
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, 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/
Here's what you need: http://blog.justin.kelly.org.au/exclude-filedirectoriesurls-from-apache-htacc/ http://brett.batie.com/software-development/password-protect-all-but-one-file-htaccess/ you need to add those scripts to allow all (remove protection off of them) or keep them outside of the password protected folder... either way works.