添加伪静态:
利用nginx的配置优先级,在配置文件添加正则匹配:
location ~* \.html$ { rewrite "^(.*)sort_([0-9]+)_([0-9]+).html$" $1sort.php?sortid=$2&page=$3 last; rewrite "^(.*)over_([0-9]+).html$" $1over.php?page=$2 last; rewrite "^(.*)top_(.*)_([0-9]+).html$" $1top.php?topid=$2&page=$3 last; rewrite "^(.*)topover_(.*)_([0-9]+).html$" $1topover.php?topid=$2&page=$3 last; rewrite "^(.*)book_([0-9]+).html$" $1book.php?bookid=$2 last; rewrite "^(.*)down_(.*)_([0-9]+).html$" $1down.php?bookid=$3&type=$2 last; rewrite "^(.*)readend_([0-9]+).html$" $1readend.php?bookid=$2 last; rewrite "^(.*)read_([0-9]+)_([0-9]+).html$" $1read.php?cutid=$2&bookid=$3 last; rewrite "^(.*)chapter_([0-9]+)_([0-9]+)_([0-9]+).html$" $1chapter.php?cutid=$2&bookid=$3&chapterid=$4 last; }
最新评论