Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
<IfModule mod_rewrite.c>
RewriteEngine on
# HTTP/1.1以外のプロトコルでの接続を拒否する。
RewriteCond %{THE_REQUEST} HTTP/(1\.0|0\.[0-9])$
RewriteRule ^(.*)$ - [R=403,L]
# HTTPによるリクエストをHTTPSにリダイレクトする。
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [R,L]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.