File:  [LON-CAPA] / loncom / rewrites / loncapa_rewrite_on.conf
Revision 1.8: download - view: text, annotated - select for diffs
Thu Dec 27 20:11:42 2018 UTC (5 years, 4 months ago) by raeburn
Branches: MAIN
CVS tags: version_2_12_X, version_2_11_X, version_2_11_4_uiuc, version_2_11_4_msu, version_2_11_4, version_2_11_3_uiuc, version_2_11_3_msu, version_2_11_3, 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_ssl.c>
    2:   <IfModule mod_rewrite.c>
    3:     RewriteEngine on
    4:     RewriteCond %{REMOTE_HOST} 127.0.0.1
    5:     RewriteRule (.*) - [L]
    6:     RewriteCond %{REQUEST_URI} ^/adm/wrapper/ext/(?!https:)
    7:     RewriteCond %{QUERY_STRING} (^|&(amp;|))usehttp=1($|&)
    8:     RewriteRule (.*) - [L]
    9:     RewriteCond %{REQUEST_URI} ^/adm/annotations$
   10:     RewriteRule (.*) - [L]
   11:     RewriteCond %{REQUEST_URI} ^/public/.*/syllabus$
   12:     RewriteCond %{QUERY_STRING} (^|&(amp;|))usehttp=1($|&)
   13:     RewriteRule (.*) - [L]
   14:     RewriteCond %{HTTPS} !=on
   15:     RewriteRule ^/(.*)$ https://%{HTTP_HOST}/$1 [R,L]
   16:   </IfModule>
   17: </IfModule>

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