Skip to content



  • The service API '/service' is upgraded to '/v1/service' during evolution.
  • To avoid from breaking existing clients, bfe rewrites requests with path '/service' and then forward to the backend service.


Modify example configurations (conf/) as the following steps:

  • Step 1. Modify conf/bfe.conf and enable mod_rewrite
Modules = mod_rewrite  # enable mod_rewrite
  • Step 2. Modify conf/mod_rewrite/mod_rewrite.conf and set the rule configuration file
DataPath = mod_rewrite/
  • Step 3. Modify rewrite rules configuration
    "Version": "init version",
    "Config": {
        "example_product": [{
            "Cond": "req_path_prefix_in(\"/service\", false)",
            "Actions": [{
                "Cmd": "PATH_PREFIX_ADD",
                "Params": [
            "Last": true
  • Step 4. Verify configured rules
curl -H "host:" "http://127.1:8080/service"

The final path of request received by service 'cluster_demo_dynamic' is 'v1/service'.