Created
May 28, 2017 13:40
-
-
Save TeemuKoivisto/d8d2cf4e265b32bc33159f3ce1ca0e43 to your computer and use it in GitHub Desktop.
users htaccess
This file contains 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 | |
# tsekkaa onko polku jo turvattu eli https:n ylitse | |
RewriteCond %{HTTPS} !=on | |
# jos ei niin uudelleen ohjaa https-polkuun R=redirect L=last eli lopettaa suorittamisen tähän sääntöön | |
RewriteRule ^/?(.*) https://teekoivi.users.cs.helsinki.fi/$1 [R,L] | |
# polku on nyt https:ssä joten voimme proxata sen taustalla pyörivälle node-prosessille | |
RewriteRule ^api/1(.*)$ http://teekoivi.users.cs.helsinki.fi:3001/$1 [P] | |
RewriteRule ^/?(.*) http://teekoivi.users.cs.helsinki.fi:8080/$1 [P] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment