我用的是PHP虚拟主机,怎么把xxxx.com/abc/ 做301跳转到xxxx.com/abc (其实就是去掉那个斜杠)现在httpd.ini文件如下:[ISAPI_Rewrite]
# 3600 = 1 hour
CacheClockRate 3600
RepeatLimit 32RewriteCond Host: ^www\.xxxx\.com$
RewriteRule (.*) http\://xxxx\.com$1 [I,RP]

解决方案 »

  1.   

    $str="http://www.xxx.com/abc/";
    $st=rtrim($str,"/");
    echo $st;$str="http://www.xxx.com/abc/";
     $st=substr($str,0,-1);
    echo $st;
      

  2.   


    不是删除掉斜杠,是301跳转到不带斜杠的地址上,这个文件httpd.ini怎么改?
      

  3.   

    RewriteRule (.*)/ http\://xxxx\.com$1 [I,RP]
    RewriteRule (.*) http\://xxxx\.com$1 [I,RP]
      

  4.   

    谢谢!总算可以了
    RewriteRule (.*)abc/ http\://xxxx\.com/abc [I,RP]