Skip to content

Add .htaccess for shared hosting https redirection #2081

@benjaminbellamy

Description

@benjaminbellamy

Static websites are easily deployed to shared hosting services but it lacks automatic redirection from http to https.

The can be solved with a .htaccess file in the _site folder:

AddDefaultCharset UTF-8
Options -Indexes +FollowSymlinks
RewriteEngine on
RewriteBase /
RewriteCond %{HTTPS} !=on
RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions