summaryrefslogtreecommitdiffstats
path: root/install/conf/ipa-rewrite.conf
diff options
context:
space:
mode:
Diffstat (limited to 'install/conf/ipa-rewrite.conf')
-rw-r--r--install/conf/ipa-rewrite.conf19
1 files changed, 19 insertions, 0 deletions
diff --git a/install/conf/ipa-rewrite.conf b/install/conf/ipa-rewrite.conf
new file mode 100644
index 00000000..ef494300
--- /dev/null
+++ b/install/conf/ipa-rewrite.conf
@@ -0,0 +1,19 @@
+# VERSION 2 - DO NOT REMOVE THIS LINE
+
+RewriteEngine on
+
+# By default forward all requests to /ipa. If you don't want IPA
+# to be the default on your web server comment this line out. You will
+# need to modify ipa_webgui.cfg as well.
+RewriteRule ^/$$ https://$FQDN/ipa/ui [L,NC,R=301]
+
+# Redirect to the fully-qualified hostname. Not redirecting to secure
+# port so configuration files can be retrieved without requiring SSL.
+RewriteCond %{HTTP_HOST} !^$FQDN$$ [NC]
+RewriteRule ^/ipa/(.*) http://$FQDN/ipa/$$1 [L,R=301]
+
+# Redirect to the secure port if not displaying an error or retrieving
+# configuration.
+RewriteCond %{SERVER_PORT} !^443$$
+RewriteCond %{REQUEST_URI} !^/ipa/(errors|config)
+RewriteRule ^/ipa/(.*) https://$FQDN/ipa/$$1 [L,R=301,NC]