Closed dirkcuys closed 5 years ago
I think I found the error. It's not actually s3_website push
that errors, but s3_website cfg apply
and the error is:
expected params[:website_configuration][:routing_rules][0][:condition][:http_error_code_returned_equals] to be a String, got value 404 (class: Fixnum) instead. (ArgumentError)
I suspect that the problem is related to how http_redirect_code is managed here
I worked around the problem by changing my config to:
- condition:
key_prefix_equals: en/courses/
http_error_code_returned_equals: "404"
redirect:
host_name: courses.p2pu.org
protocol: https
http_redirect_code: 301
I'm trying setup a redirect that only redirects a given prefix if it doesn't exist on the site:
But this doesn't work when I run s3_website push.