apisix icon indicating copy to clipboard operation
apisix copied to clipboard

Whether to consider supporting nginx's regular route matching

Open wodingyang opened this issue 2 years ago • 3 comments

Description

There are many regex-based routing rule configurations in my project, as follows: location ~*  ^/co_(.*)/product_([0-9a-zA-Z-]+)_([a-z]+).html {          if ( $uaType = "mobile") {                proxy_pass http://xxx;            }           proxy_pass http://yyy;      }

I can't replace the original rules with libradixtree based rules. Is there any plan to provide regular-based routing matching rules, or provide related plug-ins?

wodingyang avatar Jul 27 '22 03:07 wodingyang

see https://github.com/apache/apisix/blob/master/docs/en/latest/FAQ.md#how-do-i-use-regular-expressions-regex-for-matching-uri-in-a-route

Hazel6869 avatar Jul 27 '22 03:07 Hazel6869

thanks for your reply But I still have a question:how to configure? I looked at the dashboard's routing configuration - advanced configuration features,I found that only the following situations are supported, as shown in the figure: image So how to choose the uri in vars, or can only be added manually by viewing the routing page (and is there a detailed document) image

wodingyang avatar Jul 27 '22 04:07 wodingyang

@wodingyang Try the "内置参数"?

tokers avatar Jul 27 '22 08:07 tokers

This issue has been marked as stale due to 350 days of inactivity. It will be closed in 2 weeks if no further activity occurs. If this issue is still relevant, please simply write any comment. Even if closed, you can still revive the issue at any time or discuss it on the [email protected] list. Thank you for your contributions.

github-actions[bot] avatar Jul 15 '23 10:07 github-actions[bot]

This issue has been closed due to lack of activity. If you think that is incorrect, or the issue requires additional review, you can revive the issue at any time.

github-actions[bot] avatar Jul 29 '23 10:07 github-actions[bot]