- RedirectPermanent /images/osm_logo.png http://www.openstreetmap.org/assets/osm_logo.png
- RedirectPermanent /images/cc_button.png http://www.openstreetmap.org/assets/cc_button.png
-
- #
- # Define a load balancer for the local backends
- #
- <Proxy balancer://backend>
- ProxySet lbmethod=bybusyness
-<% node[:web][:backends].each do |backend| -%>
-<% if port == 443 -%>
- BalancerMember https://<%= backend %> disablereuse=on
-<% else -%>
- BalancerMember http://<%= backend %>
-<% end -%>
-<% end -%>
- </Proxy>
-
- #
- # Define a load balancer for the IC backends
- #
- <Proxy balancer://ic>
- ProxySet lbmethod=bybusyness
-<% ["rails1.bm", "rails2.bm", "rails3.bm"].each do |backend| -%>
-<% if port == 443 -%>
- BalancerMember https://<%= backend %> disablereuse=on
-<% else -%>
- BalancerMember http://<%= backend %>
-<% end -%>
-<% end -%>
- </Proxy>
-<% if port == 80 -%>
-
- #
- # Redirect requests which should be secure to https
- #
- RewriteCond %{REQUEST_URI} ^/login(\.html)?$ [OR]
- RewriteCond %{REQUEST_URI} ^/user/(new|create-account\.html)$ [OR]
- RewriteCond %{REQUEST_URI} ^/user/terms$ [OR]
- RewriteCond %{REQUEST_URI} ^/user/save$ [OR]
- RewriteCond %{REQUEST_URI} ^/user/([^/]+)/account$ [OR]
- RewriteCond %{REQUEST_URI} ^/user/reset-password$
- RewriteRule ^(.*)$ https://www.openstreetmap.org$1 [L,NE,R=permanent]
-
- #
- # Redirect api requests made to www.osm.org to api.osm.org
- #
-# RewriteCond %{HTTP_HOST} =www.openstreetmap.org
-# RewriteRule ^/api/(.*)$ http://api.openstreetmap.org/api/$1 [L,NE,R=permanent]
-
- #
- # Redirect non-api requests made to api.osm.org to www.osm.org
- #
- RewriteCond %{HTTP_HOST} =api.openstreetmap.org
- RewriteCond %{REQUEST_URI} !^/api/
- RewriteRule ^(.*)$ http://www.openstreetmap.org$1 [L,NE,R=permanent]
-<% elsif port == 443 -%>