路由调试信息
URI 配置
| 配置项 | 原始值 | 正则模式 |
|---|
| uri_detail | /voddetail/{$id}.html | /voddetail/([0-9a-z]{8})\.html |
| uri_play | /play/{$id}-{$page}.html | /play/([0-9a-z]{8})-([0-9]+)\.html |
测试用例
| 测试URL | 匹配结果 | 提取的ID |
|---|
| /voddetail/29517968.html | ✅ 匹配 detail | 29517968 |
| /voddetail/10910426.html | ✅ 匹配 detail | 10910426 |
| /play/29517968-1.html | ❌ 未匹配 |
| /play/10910426-2.html | ❌ 未匹配 |
提示:如果正则表达式不匹配,请检查:
- Redis 中存储的 uri_detail 格式是否正确
- URL 路径是否与配置的格式一致
- 正则表达式中的字符是否需要转义
完整的 XIAOYU 配置(部分)
Array
(
[uri_detail] => /voddetail/{$id}.html
[uri_play] => /play/{$id}-{$page}.html
[domain] => movie.com
[http] => 未设置
)