XF 2.2 Help creating Nginx url redirects from BD [Attachment Store] to default url schema

Coop1979

Well-known member
I'm moving from 1.5 to 2.2.x and have run into a bit of a road block with trying to move back to core over continuing to use BD [Attachment Store]. Right now all of my attachments are served by the add-on at urls like

Code:
https://attachments.mydomain.com/attachment-files/2023/07/239590_IMG_20230712_133435087.jpg

and are stored in the following directory:

Code:
data/attachment-files/YYYY/MM/

I'd like to move back to core without losing any SEO or getting dinged by Google for dead links, so I'd like to re-direct all of the current URLs to the core ones.

I have that original data_id that can redirect to the new data_id, and here is the naming convention from the BD [Attachment Store] files:

Code:
{data_id}_{name}.{extension}

Any ideas?
 
Back
Top Bottom