Created
November 2, 2013 10:01
-
-
Save amercier/7277367 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 | |
# Forbid using IP address | |
#Rewritecond %{HTTP_HOST} ^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$ | |
#Rewriterule ^(.*)$ - [F] | |
# Forbid other domains | |
Rewritecond %{HTTP_HOST} !amercier\.com [NC] | |
RewriteRule ^ - [F] | |
# Redirect to port 6780 on freebox.amercier.com | |
Rewritecond %{HTTP_HOST} ^freebox\.amercier\.com [NC] | |
Rewriterule ^ http://%{HTTP_HOST}:6780%{REQUEST_URI} [QSA,L,R=301] | |
# Redirect http://* to https://* | |
RewriteCond %{HTTPS} !on | |
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [R=301] | |
# Redirect to port 6701 on home.amercier.com | |
Rewritecond %{HTTP_HOST} ^home\.amercier\.com [NC] | |
Rewriterule ^ https://%{HTTP_HOST}:6701%{REQUEST_URI} [QSA,L,R=301] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment