duankeye2342 2014-08-14 12:23
浏览 50
已采纳

使用Htaccess代码将此字符串转换为另一个字符串

I have this url now :

new.php?news&post=111&title=XXXX

i want to have this url :

new/news/111/XXXX

How to do it with Htaccess ?

I tried to convert this with mod_rewrite but i could not !

  • 写回答

1条回答 默认 最新

  • doutu1939 2014-08-14 12:37
    关注

    Try this

    RewriteRule ^/new/news/([^/]+)/([^/]+) /new.php?news&post=$1&title=$2
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
编辑
预览

报告相同问题?