免费注册 查看新帖 |

Chinaunix

广告
  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1673 | 回复: 0
打印 上一主题 下一主题

[proxy] url_rewrite搞的头大 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2006-10-10 16:48 |只看该作者 |倒序浏览
#  TAG: url_rewrite_program
#   Specify the location of the executable for the URL rewriter.
#   Since they can perform almost any function there isn't one included.
#
#   For each requested URL rewriter will receive on line with the format
#
#   URL <SP> client_ip "/" fqdn <SP> user <SP> method <SP> urlgroup <NL>
#
#   And the rewriter may return a rewritten URL. The other components of
#   the request line does not need to be returned (ignored if they are).
#
#   The rewriter can also indicate that a client-side redirect should
#   be performed to the new URL. This is done by prefixing the returned
#   URL with "301:" (moved permanently) or 302: (moved temporarily).
#
#   It can also return a "urlgroup" that can subsequently be matched
#   in cache_peer_access and similar ACL driven rules. An urlgroup is
#   returned by prefixing the returned url with "!urlgroup!"
#
#   By default, a URL rewriter is not used.
#
#Default:
# none
url_rewrite_program /usr/local/squid/sbin/rewrite



经过N次试验后,发现(红字的那儿):返回中如果有其它的,squid并没有ignored,而是打不开。。。
如果不是some.html.*(把后面的东东全部去掉),网页永远打不开。


my rewrite prog:


  1. #!/usr/bin/perl

  2. $| = 1;

  3. while(<>) {
  4.     ### only for test ###
  5.     s@http://felix.aboil.org/a.html.*@http://www.aboil.org/b.html@;
  6.     print "301:$_";
  7. }
复制代码
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP