Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我对此有一个真正的问题,因为我无法理解正则表达式。
我正在使用 Cherokee Web Server,并且正在尝试使用正则表达式来执行重定向。
我需要获取以下网址(例如)
/parts/tr/accessories/tyres
像这样到控制器
index.php?page=parts&catalogue=tr&category=accessories&subcategory=tyres
有人可以帮帮我吗!
谢谢
我不熟悉切诺基,但正则表达式是:
([^/]+)/([^/]+)/([^/]+)/([^/]+)
替换模式如下所示:
index.php?page=$1&catalogue=$2&category=$3&subcategory=$4