Home  >  Article  >  Backend Development  >  php 关于重写规则的一个有关问题

php 关于重写规则的一个有关问题

WBOY
WBOYOriginal
2016-06-13 11:50:13864browse

php 关于重写规则的一个问题
www.baidu.com/2/baidu/p5

这样的重写规则怎么写,就是.HTACCESS,baidu不是一个文件夹也是一个参数,p5是个参数,
#RewriteRule ^.*-([0-9]{1,})\/baidu/p([0-9]{1,})$ index.php?我写的这个和其它的重写规则有冲突,怎么能把带有反斜杠的参数作为链接
------解决方案--------------------

RewriteRule ^[^/]*\/(\d{1,})\/baidu\/(p\d{1,})$ index.php?baidu=$1&p=$2

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