Home >Backend Development >PHP Tutorial > url重定向规则

url重定向规则

WBOY
WBOYOriginal
2016-06-13 13:44:171060browse

url重定向规则求救!
大家帮帮忙,我要把/sell_list.php?fid=852这样的url重写成/sell 这样的形式,规则应该怎么写呢,求解!!

------解决方案--------------------
等吧.这里精通url重写的人不多 虽然都是正则,不过写法好像有点不一样.我不甚了解 .抽时间补一补知识
------解决方案--------------------
??
这样?不明白你的意思

Assembly code

RewriteEngine on
RewriteRule ^sell/fid/([0-9]+) sell_list.php?fid=$1
RewriteRule ^sell/([0-9]+)     sell_list.php?fid=$1
<br><font color="#e78608">------解决方案--------------------</font><br>这是个重点
<br><font color="#e78608">------解决方案--------------------</font><br>jsp中可以采用下面的方法,参考下可有用<br><rule>  <br> <from>^/sell_list.jsp?fid=852</from> <br> <to type="forward">  <br> /sell/list.jsp?fid=852<br> </to>  <br></rule> <div class="clear">
                 
              
              
        
            </div>
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn