点击这里获取免费大流量卡

<<httpd.conf>>

yum install mod_perl   # 安装 apache perl 模块
yum install perl-CGI #perl CGI模块
AddHandler cgi-script .cgi .sh .pl
httpd.conf 配置全局变量 :
SetEnv REDIRECT_DEST_PREFIX http://app.gateares.com:18080/gcenter-syncservice
日志显示 404 跳转 :
Alias /ipsimage "/u01/gcenter/images/"
<Directory "/u01/gcenter/images">
Options MultiViews
AllowOverride All
Order allow,deny
Allow from all
ErrorDocument 404 "/cgi-bin/find2.sh"
</Directory>
find2.sh:( 需要大于 512 字节 ,IE 才能识别跳转 .)
#!/bin/bash
echo  content - type :  text / html
echo   ""
REDIRECT_URL = echo  $REDIRECT_URL | sed  s #/appimage#/ipsimage#
cat   <<  EOM1
< html >
< meta http - equiv = "refresh"  content = "0;url=http://app.gateares.com:18080/gcenter-syncservice$REDIRECT_URL" >
<!--
000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000
-->
</ html >
EOM1
日志显示 301 跳转 :
Alias /ipsimage "/u01/gcenter/images/"
<Directory "/u01/gcenter/images">
Options MultiViews
AllowOverride All
Order allow,deny
Allow from all
ErrorDocument 404 "/cgi-bin/redirect.pl"
</Directory>
redirect.pl:
#!/usr/bin/perl
use   strict ;
use   CGI;
my   $ q   = new CGI;
my $dest=$ENV{"REDIRECT_DEST_PREFIX"}.$ENV{"REDIRECT_URL"};
my $query_str = $ENV{"REDIRECT_QUERY_STRING"};
$dest .= "?".$query_str if(defined $query_str);
print $q->redirect($dest);

点击这里获取免费大流量卡

如果您喜欢本站,点击这儿可以捐赠本站
这些信息可能会帮助到你: 联系作者 | 报毒说明
修改版本软件,加群提示等均为修改者自留,非本站信息,注意鉴别