我想请问下,我有一个页面 index.php 里面有一个连接<a href="threadshow.php?id=<?php echo $rs->threadid;?>" class="title"><?php echo $rs->threadtitle; ?></a>点开后得到的连接地址URL的方式是http://domain.com/threadshow.php?id=某个ID数字但我想让显示隐藏连接,变成http://domain.com/?id=某个ID数字或者是http://domain.com/某个ID数字这样的格式,请问该怎么做呢?谢谢

解决方案 »

  1.   

    传的时候先Server.UrlEncode( "aa=xxxxxxx ")
    获取的时候Server.UrlDecode(Request.Querystring[ "aa "]) 
    如果不行的话,直接重写URL
      

  2.   

     如果要通过点击超链接的话,把网放放到一个框架里面是最方便的选择。只增加一个页面
    <frame>
    <frameset src="你的主页地址"></frameset>
    </frame>
    标签中的参数自己补齐.
    用框架结构来实现。这样地址栏只显示http://www.aaa.com
    用javascript的话也可以,不过就复杂了,要用POST方式传递,可能还要改后台程序,不建议使用。
      

  3.   

    传的时候先Server.UrlEncode( "aa=xxxxxxx ") 
    获取的时候Server.UrlDecode(Request.Querystring[ "aa "]) 这个是什么意思,能写明白点吗?
    IFRAME框的方式不是我需要的方式,因为我不想 URL REWRITE,所以才请教看是否有其他办法的
      

  4.   

    我现在通过下面方式
    打开APACHE中httpd.conf,然后去掉 #LoadModule rewrite_module modules/mod_rewrite.so  前面的 #然后在最后入以下代码<IfModule mod_rewrite.c> 
        RewriteEngine On
        RewriteRule /threadshow/(d+).html /threadshow.php?id=$1
    </IfModule>然后重启 APACHE这个如果我访问
    http://domain.com/threadshow.php?id=2
    是正常显示的,而
    http://domain.com/threadshow/2.html
    却无法显示,按道理上说,是应该可以显示的啊,请问这个是为什么呢? 
      

  5.   

    <IfModule mod_rewrite.c> 
        RewriteEngine On 
        RewriteRule http://domain.com/threadshow/(\d+).html http://domain.com/threadshow/threadshow.php?id=$1 
    </IfModule> 试试
      

  6.   

    还是不行
    The page cannot be found 
    The page you are looking for might have been removed, had its name changed, or is temporarily unavailable. 
    无法找到该页