File:  [LON-CAPA] / loncom / rewrites / loncapa_rewrite_off.conf
Revision 1.8: download - view: text, annotated - select for diffs
Thu Dec 27 20:11:42 2018 UTC (3 years, 11 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.

<IfModule mod_ssl.c>
  <IfModule mod_rewrite.c>
    RewriteEngine off
    RewriteCond %{REMOTE_HOST} 127.0.0.1
    RewriteRule (.*) - [L]
    RewriteCond %{REQUEST_URI} ^/adm/wrapper/ext/(?!https:)
    RewriteCond %{QUERY_STRING} (^|&(amp;|))usehttp=1($|&)
    RewriteRule (.*) - [L]
    RewriteCond %{REQUEST_URI} ^/adm/annotations$
    RewriteRule (.*) - [L]
    RewriteCond %{REQUEST_URI} ^/public/.*/syllabus$
    RewriteCond %{QUERY_STRING} (^|&(amp;|))usehttp=1($|&)
    RewriteRule (.*) - [L]
    RewriteCond %{HTTPS} !=on
    RewriteRule ^/(.*)$ https://%{HTTP_HOST}/$1 [R,L]
  </IfModule>
</IfModule>

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