1:用http_host取出前面的name 然后iframe包含 实现过.
2:用url_rewrite,没实现过,但是应该能行
2种方法任选一.

解决方案 »

  1.   

    请问怎么用http_host提取呢
    怎么写 
    我写的为什么全部提取出来了呢~~
      

  2.   

    $_SERVER[http_host] 这个服务器变量是用户访问本站的url,假如url为:name.xxx.com,然后字符串处理得到的name 然后设置frame的src 为 http://www.xxx.com/name 就行了.
      

  3.   

    HTTP_HOST 好像要大写.自己去手册上看看.
      

  4.   

    修改以下脚本: 
    方法:将其中所有的".lc365.net"换成你的网址,注意有两个"."点! <SCRIPT language=javascript> 
    if(this.location.href.indexOf('.lc365.net')!=-1){ 
    to=this.location.href.replace('http://','').split('.lc365.net')[0];if(to.substr(0,4)=='www.'){to=to.substr(4);} 
    to3=this.location.href.replace('http://','').split('.lc365.net')[1];if(to3=='/'){to3='';} 

    </SCRIPT> 
    <script language="JavaScript" src="http://www.lc365.net/domain/func.php5"> </script> 
    <SCRIPT language=javascript>function killErrors(){alert('该域名不存在!\n Powerd by FlashDomain');top.location.href='http://my.lc365.net';} 
    window.onerror=killErrors; 
    function FlashDomain(){if(eval('_u_'+to)){if(eval('_h_'+to)==1){top.location.href=eval('_u_'+to)+to3;}else{document.write(' <ht'+'ml> <he'+'ad> <ti'+'tle>'+to+'.lc365.n'+'et </ti'+'tle> </he'+'ad> <fram'+'eset rows="100%,*" border=0 frameborder=0 framespacing=0 framecolor="#000000"> <fr'+'ame sr'+'c="'+eval('_u_'+to)+to3+'" scrolling=auto> </fram'+'eset> <nofr'+'ames> <bo'+'dy> </bo'+'dy> <nof'+'rames> </bo'+'dy> </ht'+'ml>');}}} 
    if(to!='www'&&to!=''){FlashDomain();}//2004 (C) Vanwayee Technology Group. 
    //--> 
    </SCRIPT> 修改完以上代码之后,放到你网站的首页文件[index.html/index.htm等]的最顶部。 
    首页文件也可以是.asp/.php等。 最后一步:修改/domain/func.php5文件:将其中所有的".lc365.net"换成你的网址保存到服务器。 func.php5: document.write(' <scr'+'ipt language="javas'+'cript" sr'+'c="http://www.lc365.net/domain/data/'+to.substr(0,2)+'.usr" onError="top.location.href=\'http://my.lc365.net\'"> </sc'+'ript>'); 仅供参考