Rewrite URI for a specific ORIGIN

Featured

Comments

1 comment

  • Justin

    If I'm understanding you correctly, you want to use an alternate origin only if a particular path has been requested. (I'm assuming the actual path **category** doesn't really exist) As long as you can translate **category** into a rule that can be expressed as a regular expression then it can be done.

    You'd create your new backend as per this doc but instead of using a condition that checks if the backend is healthy or not you'd use one that checked if the request was for a category. eg req.url ~ "^/testbucket(/\d+/.*)$" or similar, depending on what makes up the category path structure. You can then add a host header override with the same condition attached.

    Is that what you were looking to do?

Please sign in to leave a comment.