求助apache转换lighttpd伪静态规则

火雪心 发布于 2010/11/22 23:03
阅读 344
收藏 0

RewriteEngine On
RewriteBase /

RewriteRule ^(.*)goods-([0-9]+).html$ $1goods.php?iid=$2

RewriteRule ^(.*)list-([0-9]+).html$ $1list.php?catid=$2
RewriteRule ^(.*)list-([0-9]+)-([0-9]+)-([0-9]+)-([0-9]+).html$ $1list.php?catid=$2&sortnum=$3&sp=$4&ep=$5
RewriteRule ^(.*)list-([0-9]+)-([0-9]+)-([0-9]+)-([0-9]+)-([0-9]+).html$ $1list.php?catid=$2&sortnum=$3&sp=$4&ep=$5&page=$6
RewriteRule ^(.*)list-([0-9]+)-([0-9]+)-([0-9]+)-([0-9]+)-(.+)-([0-9]+).html$ $1list.php?catid=$2&sortnum=$3&sp=$4&ep=$5&sq=$6&page=$7

RewriteRule ^(.*)list-(.+)-([0-9]+).html$ $1list.php?sq=$2&catid=$3 [L]

加载中
0
鉴客
鉴客

下面一个配置提供参考:

url.rewrite-once = (
    "^/rank/([0-9]+).html$" =>"/rank.php?pid=$1",
    "^/(\w+)/?$" =>"/userinfo.php?puser=$1",
    "^/detail/([0-9]+).html$" =>"/detail.php?id=$1"
)

0
火雪心

引用来自#2楼“鉴客”的帖子

下面一个配置提供参考:

url.rewrite-once = (
    "^/rank/([0-9]+).html$" =>"/rank.php?pid=$1",
    "^/(\w+)/?$" =>"/userinfo.php?puser=$1",
    "^/detail/([0-9]+).html$" =>"/detail.php?id=$1"
)

 额。。。重点是我看不懂正则

0
灰灰
灰灰

正则表达式

返回顶部
顶部