diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index fdddc43dad028e18dc0a0caf8723542e30c857a1..ee9ee0ae9b70865273c0c3916eeaaf5c62a3d847 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -28,7 +28,10 @@ deploy:
                               --capabilities CAPABILITY_IAM
   - aws s3 rm "s3://${STACK_NAME}.aws.uib.no" --recursive
   - aws s3 sync dist/ "s3://${STACK_NAME}.aws.uib.no" --delete
-  - aws s3api put-object --bucket "${STACK_NAME}.aws.uib.no" --key api/index.html --body api_static/index.html
+  - aws s3api put-object --bucket "${STACK_NAME}.aws.uib.no"
+                         --key api/index.html
+                         --body api_static/index.html
+                         --content-type "text/html;charset=UTF-8"
   - DISTRO_ID=$(aws cloudformation describe-stack-resource
                                    --stack-name ${STACK_NAME}
                                    --logical-resource-id Distribution
diff --git a/aws/beta.ordbok.uib.no_stack.yaml b/aws/beta.ordbok.uib.no_stack.yaml
index ff12a1beea34d4d93307e6a0e657053487d43d1a..23e000a5db6a8980d9e835c9e12e0cd404b688af 100644
--- a/aws/beta.ordbok.uib.no_stack.yaml
+++ b/aws/beta.ordbok.uib.no_stack.yaml
@@ -143,6 +143,10 @@ Resources:
           - HEAD
           Compress: true
           TargetOriginId: s3ProductionBucket
+          LambdaFunctionAssociations:
+            - EventType: viewer-request
+              IncludeBody: false
+              LambdaFunctionARN: "arn:aws:lambda:us-east-1:156160966877:function:path_rewrite:7"
           ForwardedValues:
             QueryString: 'false'
             Cookies:
@@ -165,7 +169,7 @@ Resources:
             LambdaFunctionAssociations:
               - EventType: viewer-request
                 IncludeBody: false
-                LambdaFunctionARN: "arn:aws:lambda:us-east-1:156160966877:function:path_rewrite:2"
+                LambdaFunctionARN: "arn:aws:lambda:us-east-1:156160966877:function:path_rewrite:7"
             ForwardedValues:
               QueryString: true
               Cookies: