You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by zr...@apache.org on 2019/07/11 18:31:08 UTC
[camel-website] branch master updated: chore: redirect to https
This is an automated email from the ASF dual-hosted git repository.
zregvart pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel-website.git
The following commit(s) were added to refs/heads/master by this push:
new ed262f6 chore: redirect to https
ed262f6 is described below
commit ed262f65ddd7571282046201782bdb556bca1dd7
Author: Zoran Regvart <zr...@apache.org>
AuthorDate: Thu Jul 11 20:31:03 2019 +0200
chore: redirect to https
---
static/.htaccess | 89 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 89 insertions(+)
diff --git a/static/.htaccess b/static/.htaccess
index ea8001c..5904ec1 100644
--- a/static/.htaccess
+++ b/static/.htaccess
@@ -78,6 +78,95 @@ AddDefaultCharset utf-8
</IfModule>
# ######################################################################
+# # REWRITES #
+# ######################################################################
+
+# ----------------------------------------------------------------------
+# | Rewrite engine |
+# ----------------------------------------------------------------------
+
+# (1) Turn on the rewrite engine (this is necessary in order for
+# the `RewriteRule` directives to work).
+#
+# https://httpd.apache.org/docs/current/mod/mod_rewrite.html#RewriteEngine
+#
+# (2) Enable the `FollowSymLinks` option if it isn't already.
+#
+# https://httpd.apache.org/docs/current/mod/core.html#options
+#
+# (3) If your web host doesn't allow the `FollowSymlinks` option,
+# you need to comment it out or remove it, and then uncomment
+# the `Options +SymLinksIfOwnerMatch` line (4), but be aware
+# of the performance impact.
+#
+# https://httpd.apache.org/docs/current/misc/perf-tuning.html#symlinks
+#
+# (4) Some cloud hosting services will require you set `RewriteBase`.
+#
+# https://www.rackspace.com/knowledge_center/frequently-asked-question/why-is-modrewrite-not-working-on-my-site
+# https://httpd.apache.org/docs/current/mod/mod_rewrite.html#rewritebase
+#
+# (5) Depending on how your server is set up, you may also need to
+# use the `RewriteOptions` directive to enable some options for
+# the rewrite engine.
+#
+# https://httpd.apache.org/docs/current/mod/mod_rewrite.html#rewriteoptions
+#
+# (6) Set %{ENV:PROTO} variable, to allow rewrites to redirect with the
+# appropriate schema automatically (http or https).
+
+<IfModule mod_rewrite.c>
+
+ # (1)
+ RewriteEngine On
+
+ # (2)
+ # Options +FollowSymlinks
+
+ # (3)
+ # Options +SymLinksIfOwnerMatch
+
+ # (4)
+ # RewriteBase /
+
+ # (5)
+ # RewriteOptions <options>
+
+ # (6)
+ RewriteCond %{HTTPS} =on
+ RewriteRule ^ - [env=proto:https]
+ RewriteCond %{HTTPS} !=on
+ RewriteRule ^ - [env=proto:http]
+
+</IfModule>
+
+# ----------------------------------------------------------------------
+# | Forcing `https://` |
+# ----------------------------------------------------------------------
+
+# Redirect from the `http://` to the `https://` version of the URL.
+#
+# https://wiki.apache.org/httpd/RewriteHTTPToHTTPS
+
+# (1) If you're using cPanel AutoSSL or the Let's Encrypt webroot
+# method it will fail to validate the certificate if validation
+# requests are redirected to HTTPS. Turn on the condition(s)
+# you need.
+#
+# https://www.iana.org/assignments/well-known-uris/well-known-uris.xhtml
+# https://tools.ietf.org/html/draft-ietf-acme-acme-12
+
+<IfModule mod_rewrite.c>
+ RewriteEngine On
+ RewriteCond %{HTTPS} !=on
+ # (1)
+ # RewriteCond %{REQUEST_URI} !^/\.well-known/acme-challenge/
+ # RewriteCond %{REQUEST_URI} !^/\.well-known/cpanel-dcv/[\w-]+$
+ # RewriteCond %{REQUEST_URI} !^/\.well-known/pki-validation/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$
+ RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
+</IfModule>
+
+# ######################################################################
# # SECURITY #
# ######################################################################