Skip to content

Instantly share code, notes, and snippets.

@mfd
Last active November 12, 2021 17:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mfd/4fc9567651af16c6513877a5b1977d1b to your computer and use it in GitHub Desktop.
Save mfd/4fc9567651af16c6513877a5b1977d1b to your computer and use it in GitHub Desktop.
.htaccess file for PWA and SSR apps (React, Vue)
AddType "text/html; charset=utf-8" .html .htm
AddDefaultCharset utf-8
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.html$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.html [L]
</IfModule>
# AddType "text/html; charset=windows-1251" .html .htm
# AddDefaultCharset windows-1251
# AddType application/x-httpd-php .php .htm .html
# php_value default_charset windows-1251
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment