Regex for skipping subfolder
-
Hey,
so I’m having trouble building a regex string. I’m trying to redirect attachments away from a subfolder like here
domain.com/en/product/(.*)/?attachment_id=(.*)
to
domain.com/produkt/(.*)/?attachment_id=(.*)
but for a lot of products, so it needs to match the product name and attachment_id
I’ve been playing around for hours with regex101 but I’m not sure this can be achieved at all.
^en\/product\/(.*)\/?attachment_id=(.*)
to
/produkt\/(.*)\/?attachment_id=(.*)Does anyone have any idea?
The page I need help with: [log in to see the link]
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Regex for skipping subfolder’ is closed to new replies.