“伪静态”的例子(不同版本可能很不一样,不要不思考地抄用,不要直接复制使用,bbs里面复制会带有特殊字符,要把缩进部分的用空格代替,否则会部署失败)
rewrite:
- url: ^([^\.]*)/topic-(.+)\.html$
script: $1/portal.php?mod=topic&topic=$2 last
- url: ^([^\.]*)/article-([0-9]+)-([0-9]+)\.html$
script: $1/portal.php?mod=view&aid=$2&page=$3 last
- url: ^([^\.]*)/forum-(\w+)-([0-9]+)\.html$
script: $1/forum.php?mod=forumdisplay&fid=$2&page=$3 last
- url: ^([^\.]*)/thread-([0-9]+)-([0-9]+)-([0-9]+)\.html$
script: $1/forum.php?mod=viewthread&tid=$2&extra=page%3D$4&page=$3 last
- url: ^([^\.]*)/group-([0-9]+)-([0-9]+)\.html$
script: $1/forum.php?mod=group&fid=$2&page=$3 last
- url: ^([^\.]*)/space-(username|uid)-(.+)\.html$
script: $1/home.php?mod=space&$2=$3 last
- url: ^([^\.]*)/blog-([0-9]+)-([0-9]+)\.html$
script: $1/home.php?mod=space&uid=$2&do=blog&id=$3 last
- url: ^([^\.]*)/(fid|tid)-([0-9]+)\.html$
script: $1/index.php?action=$2&value=$3 last
- url: ^([^\.]*)/([a-z]+[a-z0-9_]*)-([a-z0-9_\-]+)\.html$
script: $1/plugin.php?id=$2:$3 last
发表回复