[Solved] Error in HTML5 exporting

  • I am sure it's my error somewhere, but...

    I have tried to host my game on a website, and I have this situation just after loaded:

    While it should be like this:

    What am I missing?

    It seems it doesn't start with the functions...

    Many thanks in advance

  • Might check the mime types the server allows.

  • Could you please point me in the right direction? What have I to check? ^^;

    Edit: Maybe I've found something... I am working on it, I'll let you know

  • Nope, I've tried editing my .httaccess file, but still nothing new.

    This is my file:

    --

    # Do not remove this line, otherwise mod_rewrite rules will stop working

    RewriteBase /

    AddType text/plain .txt

    AddType text/html .html .htm

    AddType text/css .css

    AddType text/xml .scml .xml

    AddType text/csv .csv

    AddType text/cache-manifest .appcache

    AddType image/svg+xml .sgv

    AddType image/png .png

    AddType image/jpeg .jpeg .jpg .jpe .JPG

    AddType audio/ogg .ogg .opus

    AddType audio/mp4 .m4a

    AddType video/webm .webm

    AddType video/ogv .ogv

    AddType application/font-woff .woff

    AddType application/json .scon .json

    AddType application/x-web-app-manifest+json .webapp

    AddType application/manifest+json .manifest

    AddType application/pdf .pdf

    AddType application/zip .zip

    AddType application/javascript .js

    --

    Edit:

    The console says the error is Cross-Origin Request Blocked, so I changed my .httaccess in this way:

    ---

    # Do not remove this line, otherwise mod_rewrite rules will stop working

    RewriteBase /

    <FilesMatch "\.(php)$">

    <IfModule mod_headers.c>

    Header set Access-Control-Allow-Origin "*"

    </IfModule>

    </FilesMatch>

    AddType text/plain .txt

    AddType text/html .html .htm

    AddType text/css .css

    AddType text/xml .scml .xml

    AddType text/csv .csv

    AddType text/cache-manifest .appcache

    AddType image/svg+xml .sgv

    AddType image/png .png

    AddType image/jpeg .jpeg .jpg .jpe .JPG

    AddType audio/ogg .ogg .opus

    AddType audio/mp4 .m4a

    AddType video/webm .webm

    AddType video/ogv .ogv

    AddType application/font-woff .woff

    AddType application/json .scon .json

    AddType application/x-web-app-manifest+json .webapp

    AddType application/manifest+json .manifest

    AddType application/pdf .pdf

    AddType application/zip .zip

    AddType application/javascript .js

    --

    but still I cannot make it work.

    Is there anybody who can teach me on how have I to write a correct .htaccess file?

  • BTW, here is the URL: http://testacc.netne.net/XWing/

    Maybe somebody more xpert than me can help, looking at the console

  • Cross origin request? Are you referencing something hosted on a domain sperate from where you uploaded to?

    It is not your server that's blocking the request usually, it is the one you are trying to get the file from.

  • I am not referencing nothing at all... maybe it can be the json files I load? But they are local files... or, at least, they should be... :look:

    Edit: This is how I make the call:

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Any idea somebody?

    The "final" version of my .htaccess, after tons of tests, is now:

    # DO NOT REMOVE THIS LINE AND THE LINES BELOW HOTLINKID://www.google.com

    RewriteEngine on

    RewriteCond %{HTTP_REFERER} !^http://testacc.netne.net/.*$ [NC]

    RewriteCond %{HTTP_REFERER} !^http://testacc.netne.net$ [NC]

    RewriteCond %{HTTP_REFERER} !^http://www.testacc.netne.net/.*$ [NC]

    RewriteCond %{HTTP_REFERER} !^http://www.testacc.netne.net$ [NC]

    RewriteRule .*\.(zip|rar|exe|mp3|pdf|swf|psd)$ http://http [R,NC]

    # DO NOT REMOVE THIS LINE AND THE LINES ABOVE //www.google.com:HOTLINKID

    # Do not remove this line, otherwise mod_rewrite rules will stop working

    RewriteEngine On

    RewriteBase /XWing/

    <FilesMatch ".(json|css|scml|woff|webapp|appcache)">

    Header set Access-Control-Allow-Origin "*"

    </FilesMatch>

    AddType text/plain .txt

    AddType text/html .html .htm

    AddType text/css .css

    AddType text/xml .scml .xml

    AddType text/csv .csv

    AddType text/cache-manifest .appcache

    AddType image/svg+xml .sgv

    AddType image/png .png

    AddType image/jpeg .jpeg .jpg .jpe .JPG

    AddType audio/ogg .ogg .opus

    AddType audio/mp4 .m4a

    AddType video/webm .webm

    AddType video/ogv .ogv

    AddType application/font-woff .woff

    AddType application/json .scon .json

    AddType application/x-web-app-manifest+json .webapp

    AddType application/manifest+json .manifest

    AddType application/pdf .pdf

  • No idea? What am I missing?

    Sorry for the "newbieness" ( :look: ) of the question...

  • "Once you eliminate the impossible, whatever remains, no matter how improbable, must be the truth"

    Since I don't know nothing about web programming and I am still learning, I thought the problem was on some misterious file/configuration... instead was much more simpler: once the file were uploaded, they became all lower case, so "Ships.json" become "ships.json" and so the error the console gave should be interpreted as "file not found" and no cross reference...

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)