宏哥娱乐网本次为大家分享的是伪静态:nginx的rewrite规则-宝塔2.9-4.0
location / { rewrite ^(.*)/lists/(\w+)/(\d+)/(.*)/$ $1/index.php?s=Home/lists/lists/id/$3/$4; rewrite ^(.*)/lists/(\w+)/(\d+)/$ $1/index.php?s=Home/lists/lists/id/$3; rewrite ^(.*)/movie/(\d+)/$ $1/index.php?s=Home/movie/Index/id/$2; rewrite ^(.*)/news/(\d+)/$ $1/index.php?s=Home/news/Index/id/$2; rewrite ^(.*)/player/(.*)/$ $1/index.php?s=Home/player/Index/$2; rewrite ^(.*)/down/(.*)/$ $1/index.php?s=Home/player/down/$2; rewrite ^(.*)/keyword/(\S+)/(.*)/$ $1/index.php?s=Home/Search/Index/keyword/$2/$3; rewrite ^(.*)/keyword/(\S+)/$ $1/index.php?s=Home/Search/Index/keyword/$2; rewrite ^(.*)/(\w+)/(\d+)/p/(\d+)/$ $1/index.php?s=Home/lists/Index/id/$3/$4; rewrite ^(.*)/(\w+)/(\d+)/$ $1/index.php?s=Home/lists/Index/id/$3 last; if (!-e $request_filename) { rewrite ^(.*)$ /index.php?s=$1 last; break; } }