laurilehmijoki / s3_website

Manage an S3 website: sync, deliver via CloudFront, benefit from advanced S3 website features.
Other
2.24k stars 186 forks source link

[Feature] Redirect xyz/index.html to xyz #168

Closed alexw23 closed 9 years ago

alexw23 commented 9 years ago

Just wanted to put out a feature request, I find it frustrating that you can access a path by either /contact and /contact/index.html. This means it could be indexed twice - and may also play up with analytics.

S3 has routing rules that can handle the task of routing /contact/index.html to /contact as seen below

<RoutingRules>
    <RoutingRule>
    <Condition>
      <KeyPrefixEquals>contact/index.html</KeyPrefixEquals>
    </Condition>
    <Redirect>
      <ReplaceKeyPrefixWith>contact/</ReplaceKeyPrefixWith>
    </Redirect>
    </RoutingRule>
</RoutingRules>

It just needs to be automated with s3_website. I assume there would be a config of some sort you can turn on that would apply these routing rules automatically?

laurilehmijoki commented 9 years ago

Would canonical URLs help you?

laurilehmijoki commented 9 years ago

Closing as inactive. Please reopen if needed.