| 1 |
# VERSION 7 - DO NOT REMOVE THIS LINE |
| 2 |
|
| 3 |
RewriteEngine on |
| 4 |
|
| 5 |
# By default forward all requests to /ipa. If you don't want IPA |
| 6 |
# to be the default on your web server comment this line out. |
| 7 |
${AUTOREDIR}RewriteRule ^/$$ https://$FQDN/ipa/ui [L,NC,R=301] |
| 8 |
|
| 9 |
# Redirect to the fully-qualified hostname. Not redirecting to secure |
| 10 |
# port so configuration files can be retrieved without requiring SSL. |
| 11 |
RewriteCond %{HTTP_HOST} !^$FQDN$$ [NC] |
| 12 |
RewriteCond %{HTTP_HOST} !^ipa-ca.$DOMAIN$$ [NC] |
| 13 |
RewriteRule ^/ipa/(.*) http://$FQDN/ipa/$$1 [L,R=301] |
| 14 |
|
| 15 |
# Redirect to the secure port if not displaying an error or retrieving |
| 16 |
# configuration. |
| 17 |
RewriteCond %{SERVER_PORT} !^443$$ |
| 18 |
RewriteCond %{REQUEST_URI} !^/ipa/(errors|config|crl) |
| 19 |
RewriteCond %{REQUEST_URI} !^/ipa/[^\?]+(\.js|\.css|\.png|\.gif|\.ico|\.woff|\.svg|\.ttf|\.eot)$$ |
| 20 |
RewriteRule ^/ipa/(.*) https://$FQDN/ipa/$$1 [L,R=301,NC] |
| 21 |
|
| 22 |
RewriteCond %{HTTP_HOST} ^ipa-ca.$DOMAIN$$ [NC] |
| 23 |
RewriteCond %{REQUEST_URI} !^/ipa/crl |
| 24 |
RewriteCond %{REQUEST_URI} !^/(ca|kra|pki|acme) |
| 25 |
RewriteRule ^/(.*) https://$FQDN/$$1 [L,R=301] |
| 26 |
|
| 27 |
# Rewrite for plugin index, make it like it's a static file |
| 28 |
RewriteRule ^/ipa/ui/js/freeipa/plugins.js$$ /ipa/wsgi/plugins.py [PT] |