🚀 开头匹配重定向
匹配以指定字符串开头的URL,适用于域名和路径重定向
配置规则
# 开头匹配测试配置
^dev.localhost####https://development.example.com
^api.localhost####https://api.example.com
^localhost:8####https://development.example.com
staging.internal*####https://staging.example.com💡 规则说明
使用 ^ 前缀或 * 后缀进行开头匹配,推荐使用标准域名格式。
- 推荐格式: 使用
.localhost、.local或带端口的localhost - 适用场景: 开发环境、内网域名、特定端口服务
- 注意: 简单字符串(如
dev、api)在浏览器地址栏直接输入时可能被当作搜索词 - 最佳实践: 配合书签、链接点击或程序化访问使用
