2009年6月4日星期四

[PerlChina] Re: 求助 请教大家静态页面的地址栏url是如何输出的?

这个你自己拼链接啊,或者写个函数转换下url。类似这样的。
sub url_rewrite() {
      my $url = shit;
      $url =~ s#www.host.com/cgi-bin/(.*)#www.host.com/cgi/bin/$1#;
      return $url;
}
其实你的连接不是在你页面里自己写么,自己手动写下rewrite链接不就行了啊

-------
twitter : http://twitter.com/smallfish_xy
blog    : http://hi.baidu.com/smallfish_xy http://hi.baidu.com/smallfish7788


2009/6/4 zhang jy <fengpxu@gmail.com>
谢谢。
我的情况是这样的
后缀可以去掉,url rewrite 也可以正常使用,但是,他只能在我输入www.host.com/cig/bin/main 的时候rewirite到www.host.com/cgi-bin/main
可是,我的程序,如何才能输出www.host.com/cgi/bin/main这个url?
这是我想知道答案的问题!
谢谢。

2009/6/4 smallfish <smallfish.xy@gmail.com>

1. 去掉后缀名
2. url rewrite(apache mod_rewrite.so)
-------
twitter : http://twitter.com/smallfish_xy
blog    : http://hi.baidu.com/smallfish_xy http://hi.baidu.com/smallfish7788


2009/6/4 zhang jy <fengpxu@gmail.com>

我用perl 的cgi模块输出一个页面,我希望的到一个不同的地址。以便搜索引擎搜索到。请问,我要如何才能输出?
 
http://www.host.com/cgi-bin/main.cgi是我的真实程序地址。
http://www.host.com/cgi/bin/main 是我期待得到的地址。
 
请诸位不吝赐教。
谢谢 
 






--~--~---------~--~----~------------~-------~--~----~
您收到此信息是由于您订阅了 Google 论坛"PerlChina Mongers 讨论组"论坛。
 要在此论坛发帖,请发电子邮件到 perlchina@googlegroups.com
 要退订此论坛,请发邮件至 perlchina+unsubscribe@googlegroups.com
 更多选项,请通过 http://groups.google.com/group/perlchina?hl=zh-CN 访问该论坛

-~----------~----~----~----~------~----~------~--~---

没有评论: