# Permalink with wildcards

**URL:** https://meta.discourse.org/t/permalink-with-wildcards/109329
**Category:** Support
**Created:** [February 16, 2019, 4:17pm UTC](https://meta.discourse.org/t/permalink-with-wildcards/109329 "2019-02-16T16:17:52Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![barreeeiroo](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/barreeeiroo/32/165264_2.png) [@barreeeiroo](https://meta.discourse.org/u/barreeeiroo)
#### Post date: [February 16, 2019, 4:17pm UTC](https://meta.discourse.org/t/permalink-with-wildcards/109329/1 "2019-02-16T16:17:52Z")

</div>

Following with this dicussion

> [@Uploads migration to S3 was not successful at all](https://meta.discourse.org/t/uploads-migration-to-s3-was-not-successful-at-all/108041):
>
> We have recently migrated the uploads to an AWS S3 Container, but there’s some stuff that is broken at this moment Uploaded files still use the “old” path: At our community, people can upload project files to share with our users, which are not treated as images Due to this, posts having \<a href="/uploads/default/..."\>Blah blah blah\</a\> point to our community instead of the community CDN (which is AWS), not like images Images are working properly, but other files are not What have I misse…

Is it possible to add a redirect from `/uploads/default/(*)` **to** `https://kodular-community.s3.dualstack.eu-west-1.amazonaws.com/$1` ?

This would fix all 404 requests to all posts in our community

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [February 16, 2019, 5:51pm UTC](https://meta.discourse.org/t/permalink-with-wildcards/109329/2 "2019-02-16T17:51:03Z")

</div>

For that you want to do a remap.

---

<div class="post-metadata">

### Author: ![barreeeiroo](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/barreeeiroo/32/165264_2.png) [@barreeeiroo](https://meta.discourse.org/u/barreeeiroo)
#### Post date: [February 16, 2019, 6:23pm UTC](https://meta.discourse.org/t/permalink-with-wildcards/109329/3 "2019-02-16T18:23:46Z")

</div>

Thanks, I made the following remap and it worked!

`rake posts:remap["<a class=\"attachment\" href=\"/uploads/default/","<a class=\"attachment\" href=\"https://kodular-community.s3.dualstack.eu-west-1.amazonaws.com/"]`

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [February 16, 2019, 6:27pm UTC](https://meta.discourse.org/t/permalink-with-wildcards/109329/4 "2019-02-16T18:27:22Z")

</div>


