Skip to content

Instantly share code, notes, and snippets.

@hachesilva
Created September 16, 2023 01:31
Show Gist options
  • Save hachesilva/2e5bc5091db1557770dfb58b34050705 to your computer and use it in GitHub Desktop.
Save hachesilva/2e5bc5091db1557770dfb58b34050705 to your computer and use it in GitHub Desktop.
Automatically serve files with UTF-8 encoding on Apache server
# Source: https://nicolasbouliane.com/blog/force-apache-serve-utf-8-default-htaccess
# Serve all text files as unicode
AddDefaultCharset utf-8
# Set encoding on individual file types
AddCharset utf-8 .html .css .js .php
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment