Created
March 26, 2023 12:30
-
-
Save strlns/fe9652ad9fbb5dee1fd136a81aceef9c to your computer and use it in GitHub Desktop.
.htaccess to serve markdown files with proper encoding (if the server doesn't)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Rationale: My shared hosting at netcup serves UTF-8-encoded markdown files | |
# with Mojibake (especially important for Chromium which opens them directly as plaintext) | |
# | |
# MIME-Type text/markdown is new but pretty standard and well supported. | |
# | |
<IfModule mod_headers.c> | |
<Files "*.md"> | |
Header set Content-Type 'text/markdown; charset=utf-8' | |
</Files> | |
</IfModule> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment