求一段rewrite守则
程序员文章站
2022-04-04 18:25:13
...
求一段rewrite规则
httpd.ini的
[ISAPI_Rewrite]
CacheClockRate 3600
RepeatLimit 32
RewriteRule /(\d+)\.html /index\.php\?p=$1
RewriteRule /(\d+) /s\.php\?id=$1
RewriteRule /(\d+)/index\.html /s\.php\?id=$1
http://www.jvvhb.info/123/3.html
URL重写
http://www.jvvhb.info/s.php?k=123&x=3
前面的目录重写已经成功了,大家可以参考下
------解决方案--------------------
RewriteRule ^(.*)/(\d+)/(\d+)\.html$ $1/s\.php\?k=$2&x=$3 [L]
照葫化瓢呗~
httpd.ini的
[ISAPI_Rewrite]
CacheClockRate 3600
RepeatLimit 32
RewriteRule /(\d+)\.html /index\.php\?p=$1
RewriteRule /(\d+) /s\.php\?id=$1
RewriteRule /(\d+)/index\.html /s\.php\?id=$1
http://www.jvvhb.info/123/3.html
URL重写
http://www.jvvhb.info/s.php?k=123&x=3
前面的目录重写已经成功了,大家可以参考下
------解决方案--------------------
RewriteRule ^(.*)/(\d+)/(\d+)\.html$ $1/s\.php\?k=$2&x=$3 [L]
照葫化瓢呗~
相关文章
相关视频
上一篇: MySQL存储函数错误[Err]1064的调试记录_MySQL
下一篇: php生成8位不重复字符串