User Tools

Site Tools


docs:htaccess

htaccess Overview

I've included a zipped .htaccess file. This provides essential server configuration for Unity WebGL deployment. It enables compression, sets proper MIME types, and configures cross-origin policies to ensure your WebGL game runs smoothly across the many different hosting environments.

Features

  • Brotli Compression for .js, .wasm, and .data files
  • GZIP Compression for .unityweb files (pre-compressed by Unity)
  • Automatic content encoding headers for compressed files
  • CORS headers for cross-domain compatibility
  • Security policies for WebGL content isolation
  • Proper MIME type definitions for all file types

Installation

  • Unzip the .htaccess source file, and place it in your BuildFolder

Troubleshooting

  • Requires Apache Web Server
  • You may need to Flush your DNS; Open Command Prompt (Press Start button and type “cmd”), input ipconfig/dnsflush and press enter; then:
  • Press CTRL+F5 to hard refresh your page.
  • You can try your game in incognito mode - If it works there, then your dns hasn't flushed correctly.

Visit my Discord Server for assistance if need be. http://BumblingWizard.com

docs/htaccess.txt · Last modified: by danosono

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki