【发布时间】:2020-08-14 07:32:21
【问题描述】:
我不断收到这个非常烦人的错误:
E: Error parsing configuration files:
- routes: Error loading file: while parsing a quoted scalar
in ".magento/routes.yaml", line 14, column 1
found unknown escape character
in ".magento/routes.yaml", line 14, column 31
我的文件相当简单。请在下面找到它:
# The routes of the project.
#
# Each route describes how an incoming URL is going to be processed.
#"http://{default}/":
# type: upstream
# upstream: "mymagento:php"
http://{default}/:
type: upstream
redirects:
paths:
"^/catalogsearch/result((/)|(/\?)|(/\?[a-z])|(/\?[a-z]=))?$": { to: "https://www.example.com/", regexp: true }
我尝试过使用双引号和单引号,并且我还尝试使用 \/ 转义第 14 行第 1 列
我不确定我做错了什么,但在这一点上我正在失去情节。在这里需要帮助。提前致谢。
# The routes of the project.
#
# Each route describes how an incoming URL is going to be processed.
#"http://{default}/":
# type: upstream
# upstream: "mymagento:php"
http://{default}/:
type: upstream
redirects:
paths: ^/catalogsearch/result((/)|(/\\?)|(/\\?[a-z])|(/\\?[a-
z]=))?$ : { to: https:///www.example.com/, regexp: true }
【问题讨论】:
标签: regex url url-rewriting routes