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, 3 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.

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

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