Last active
February 9, 2018 04:56
-
-
Save yukihane/ebf1d71a161c826f1909909f36dd7420 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
RewriteEngine On | |
# Force from http to https | |
RewriteCond %{HTTPS} off | |
RewriteCond %{HTTP:X-Sakura-Forwarded-For} ^$ | |
RewriteRule ^.*$ https://%{HTTP_HOST}%{REQUEST_URI} [R,L] | |
# https://help.sakura.ad.jp/hc/ja/articles/206054662-mod-rewrite%E3%82%92%E4%BD%BF%E3%81%A3%E3%81%9F%E3%82%A2% | |
E3%82%AF%E3%82%BB%E3%82%B9%E5%88%B6%E5%BE%A1 | |
RewriteCond %{HTTP_HOST} ^(www\.)?himeji-cs\.sakura\.ne\.jp$ [NC] | |
RewriteRule .* https://himeji-cs.jp%{REQUEST_URI} [R=301,L] | |
# for MediaWik short URL | |
RewriteRule ^/?wiki(/.*)?$ %{DOCUMENT_ROOT}/mediawiki/index.php [L] | |
# RewriteRule ^/?$ %{DOCUMENT_ROOT}/mediawiki/index.php [L] | |
# php for WordPress | |
DirectoryIndex index.html index.php .ht |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment