File:  [LON-CAPA] / doc / install / linux / sslrewrite.conf
Revision 1.2: download - view: text, annotated - select for diffs
Thu Dec 27 20:11:55 2018 UTC (5 years, 9 months ago) by raeburn
Branches: MAIN
CVS tags: version_2_12_X, HEAD
- For servers using Apache/SSL where External Resource points at http:// URL
  or syllabus is configured to use an external http:// URL, query string for
  links contains usehttp=1, unless server has Strict-Transport-Security set
  for Apache with max-age > 0.

    1: <IfModule mod_rewrite.c>
    2:   RewriteEngine on
    3:   RewriteCond %{HTTPS} =on
    4:   RewriteCond %{REQUEST_URI} ^/adm/wrapper/ext/(?!https:\/\/)
    5:   RewriteCond %{QUERY_STRING} (^|&(|amp;))usehttp=1($|&)
    6:   RewriteRule ^/adm/wrapper/ext/(?!https:\/\/) http://%{HTTP_HOST}%{REQUEST_URI} [R,L,NE]
    7:   RewriteCond %{REMOTE_ADDR} 127.0.0.1
    8:   RewriteRule (.*) - [L]
    9:   RewriteCond %{REMOTE_ADDR} {[[[[HostIP]]]]}
   10:   RewriteRule (.*) - [L]
   11:   RewriteCond %{REQUEST_URI} ^/public/.*/syllabus$
   12:   RewriteCond %{QUERY_STRING} (^|&(|amp;))usehttp=1($|&)
   13:   RewriteRule ^/public/.*/syllabus$ http://%{HTTP_HOST}%{REQUEST_URI} [R,L,NE]
   14: </IfModule>

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>