有没有可能实现这样的功能如下: 
把http//www.xxx.com转向到http//www.yyy.com 
然后进入http//www.xxx.com/a.html就直接转向到http//www.yyy.com/a.html 
进入http//www.xxx.com/b.html就直接转向到http//www.yyy.com/b.html
进入http//www.xxx.com/c.html就直接转向到http//www.yyy.com/c.html 
进入http//www.xxx.com/d.html就直接转向到http//www.yyy.com/d.html 
不知道有没讲清楚!!我的意思就是目标域名保留原来域名的地址页。 不要域名解吸那的,有些广告问题不能那样解吸,请知道的高手直接给代码,如果是不可能实现也请给个回复,先谢了我两个都是php动态网站直接在header.htm里加代码就可以了,请知道的高手直接给代码好吗 ?先谢了

解决方案 »

  1.   

    把http//www.xxx.com转向到http//www.yyy.com在http//www.xxx.com的默认索引页面中加上header('location: http//www.yyy.com');其他同上
      

  2.   

    我的转向代码是<meta http-equiv="Refresh" content="15; URL=http://bbs.yyy.com/">应该在哪加代码啊//??
      

  3.   

    加在页面里
    <html>
    <meta http-equiv="Refresh" content="15; URL=http://bbs.yyy.com/">
    ...
      

  4.   

    好象不好办
    如果你用的是动态网
    在所有的〈meta http-equiv="Refresh" content="15; URL=http://bbs.yyy.com/">将本页的转成你要的
      

  5.   

    还有一种方法就是直接写更替然后用header就成了如果每个页面都要这么转,那我没有办法了,如果不做DNS解析,就做成那样的东西,实在是太困难了……
      

  6.   

    百度搜索智能404。记得给分啊兄弟大家仔细观察就会发现 
    http://niuyou.com/XXXXXXX
    http://www.mydot.org/XXXXXXX
    玉米后面的地址是自动替换的
    也就是说:
    会根据访问者请求的原来旧站中存在的页面,自动的跳转到新站中相应的页面
    如:
    访问者请求http://niuyou.com/t1.html
    则系统自动跳转到http://www.mydot.org/t1.htmlShtml版代码:
      CODE: [Copy to clipboard]   
    <html>
    <head>
    <meta http-equiv='refresh' content='5; url=http://www.mydot.org<!--#echo var="REQUEST_URI" -->'>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
    <STYLE type=text/css>
    BODY {
            FONT-SIZE: 12px;
            SCROLLBAR-ARROW-COLOR: #000000;
            FONT-FAMILY: "Verdana", "Arial", "Helvetica", "sans-serif";
            SCROLLBAR-BASE-COLOR: #828fa2;
    }
    TD {
            FONT-SIZE: 12px;
            FONT-FAMILY: "Verdana", "Arial", "Helvetica", "sans-serif";
    }
    A:active {
            COLOR: #000000; TEXT-DECORATION: underline
    }
    A:visited {
            COLOR: #455164; TEXT-DECORATION: underline
    }
    A:hover {
            COLOR: #000000; TEXT-DECORATION: none
    }
    A:link {
            COLOR: #455164; TEXT-DECORATION: underline
    }
    </STYLE>
    <TITLE>本站已经启用新的国际域名WWW.MyDoT.ORG,系统正在为你重新定向到新网站中的相应网页.......</TITLE>
    </head>
    <body leftmargin="10" topmargin="10" marginwidth="10" marginheight="10" style="table-layout:fixed; word-break:break-all">
    <table width="100%" border="0" cellspacing="0" cellpadding="0" height="95%" align="center">
    <tr align="center" valign="middle">
            <td>
            <table border="0" cellspacing="1" cellpadding="10" bgcolor="#555555" width="60%">
            <tr>
                    <td bgcolor="#EEEEEE" align="center">
                    <p><b>本站启用新的国际域名<a href=http://www.mydot.org>MyDoT.ORG</a>,系统正在为你重新定向到新站中的相应网页....</b></p></td>
            </tr>
            <tr>
                    <td bgcolor="#EEEEEE" align="left">
                    <p>目前你需要访问旧站YOYO.COM.RU中的页面:http://yoyo.com.ru<;!--#echo var="REQUEST_URI" --><br><br>
            系统在5秒后将为你重新定向到新站<b>MyDoT.ORG</b>中相应的页面<br>
            如果你不想等待,请直接点击下面的连接进入:<a href=http://www.mydot.org<!--#echo var="REQUEST_URI" -->>http://www.mydot.org<;!--#echo var="REQUEST_URI" --></a><br>
            </td>
            </tr>
            </table>
            </td>
    </tr>
    </table>
    </body>
    </html> 
     
    PHP版的代码:
      CODE: [Copy to clipboard]   
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
    <title>404</title>
    <meta http-equiv='refresh' content='5; url=http://www.mydot.org<?=$_SERVER[REQUEST_URI]?>'>
    </head>
    <body>
    本站起用新域名访问
    你目前访问的页面是
    http://yoyo.com.ru<?=$_SERVER['REQUEST_URI']?>
    系统为你重新定向到新站相应的页面
    http://www.mydot.org<?=$_SERVER['REQUEST_URI']?>
    或等待5秒后,系统自动跳转到新站相应的页面
    </body>
    </html> 
     
    使用方法:
    与xrea404一样用,如果是cp空间
    第一个保存为404.shtml就可以了
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
    <title>404</title>
    <STYLE type=text/css>
    body {
            FONT-SIZE: 12px;
            FONT-FAMILY: "Verdana", "Arial", "Helvetica", "sans-serif";
            SCROLLBAR-BASE-COLOR: #828fa2;
                    text-align:center;
                    background:#FCBB00;
                    margin:100px;
    }
    #box{border:10px solid #ABD80F;
    width:500px;
    padding:10px;
    line-height:180%;
    text-align:left;
    background:#FDFAF4;}
    </style>
    <meta http-equiv='refresh' content='5; url=http://im286.com<%= Request.ServerVariables("PATH_INFO")%>'>
    </head>
    <body>
    <div id="box">
    &#8226;本站起用新域名访问
    你目前访问的页面是
    http://<%= Request.ServerVariables("REMOTE_HOST")%><%= Request.ServerVariables("PATH_INFO")%><br />
    &#8226;系统为你重新定向到新站相应的页面
    http://www.im286.com<%= Request.ServerVariables("PATH_INFO")%><br />
    &#8226;或等待5秒后,系统自动跳转到新站相应的页面
    </div>
    </body>
    </html> 
      

  7.   

    给你个例子http://www.pigcode.com/dispbbs.asp?boardid=3&id=216