path_beg : prefix match  前缀匹配
path_dir : subdir match
path_dom : domain match
path_end : suffix match 后缀匹配 path : string
This extracts the request's URL path, which starts at the first slash and
ends before the question mark (without the host part). A typical use is with
prefetch-capable caches, and with portals which need to aggregate multiple
information from databases and keep them in caches. Note that with outgoing
caches, it would be wiser to use "url" instead. With ACLs, it's typically
used to match exact file names (eg: "/login.php"), or directory parts using
the derivative forms. See also the "url" and "base" fetch methods. 提取请求的URL 的path,以第一个/开始和 在问号前结束(没有主机部分) 一个典型的使用是在预取caches, 和许多门户网站需要集合多个信息从数据库, 把它们放在cache里。 path_beg 用于测试请求的URI是否以指定的模式开头。 第一个/开始 http://120.55.118.6:3000/admin/api/menu http://120.55.118.6:3000/admin/api/test http://www.hyyche.com/admin/api/test [root@wx03 mojo]# cat test.pl
use Mojolicious::Lite;
use JSON qw/encode_json decode_json/;
use Encode;
no strict;
use JSON; # /foo?user=sri
get '/admin/api/menu' => sub {
my $c = shift; $c->render(text => "welcome /admin/api/menu" );
}; get '/admin/api/test' => sub {
my $c = shift; $c->render(text => "welcome /admin/api/test" );
}; app->start; 请求带/admin开头的都转发到 相应的机器

最新文章

  1. 使用PhantomJS实现网页截图服务
  2. Spring 4 使用Freemarker模板发送邮件&添加附件
  3. jsp 头像上传显示部分代码实现
  4. CSS实现DIV水平 垂直居中-1
  5. 【代码笔记】iOS-多张图片合成一张
  6. 加快Bitmap的访问速度
  7. CSS Flex弹性布局
  8. 引入代码后,在@override报错
  9. java.sql.SQLException: Lock wait timeout exceeded --转
  10. C# 实现简单状态机(参考代码)
  11. Java线程:条件变量、原子量、线程池等
  12. .net做的exe和electron做的exe之间的通信问题
  13. python阅读目录
  14. MVC 验证规则扩展(当RoleID 属性值为A,B 时,Email 属性必填)
  15. 洛谷 P2463 [SDOI2008]Sandy的卡片 解题报告
  16. csdn博客
  17. 雨痕 的《Python学习笔记》--附脑图(转)
  18. CentOS修改系统的默认启动模式为命令号界面
  19. python 爬虫系列07-天气爬虫
  20. IOS KVO的实现原理

热门文章

  1. DevExpress ASP.NET 使用经验谈(6)-ASPxGridView属性设置与CRUD界面优化
  2. javascript基础、语法
  3. cookie保存分页参数
  4. beta分布
  5. graph isomorphism 开源算法库VFlib, Nauty
  6. 转: requirejs压缩打包r.js使用示例 2 (~~很详细的教程)
  7. hibernate 延长加载范围 4.2
  8. VBS脚本病毒特点及如何防范3(转)
  9. iReport5.6.0 linechart 制作方法
  10. 【Oracle】SQL*Loader-522: lfiopn failed for file