summaryrefslogtreecommitdiffstats
path: root/ipa-server/xmlrpc-server/ipa-rewrite.conf
blob: 977be73980da374e18e473e05ac2a7ebe71ecddb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
RewriteEngine on

# 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 ^/(.*)          http://$FQDN/$$1 [L,R=301]

# Redirect to the secure port if not displaying an error or retrieving
# configuration.
RewriteCond %{SERVER_PORT}  !^443$$
RewriteCond %{REQUEST_URI}  !^/(errors|config|favicon.ico)
RewriteRule ^/(.*)          https://$FQDN/$$1 [L,R=301,NC]