杰奇小说:阿帕奇规则改成Nginx伪静态

RewriteEngine on

RewriteCond %{HTTP_HOST} ^(baidu\.com)(:80)? [NC]
RewriteRule ^(.*) http://www.baidu.com/$1 [R=301,L]
RewriteRule ^api/baidu_sitemap_([0-9]+).xml$  api/baidu_sitemap.php?page=$1;
RewriteRule ^api/baidu_sitemap.xml$  api/baidu_sitemap.php;
RewriteRule ^xuanhuan/$ /modules/article/articlelist.php?class=1
RewriteRule ^wuxia/$ /modules/article/articlelist.php?class=2
RewriteRule ^dushi/$ /modules/article/articlelist.php?class=3
RewriteRule ^lishi/$ /modules/article/articlelist.php?class=4
RewriteRule ^youxi/$ /modules/article/articlelist.php?class=5
RewriteRule ^kehuan/$ /modules/article/articlelist.php?class=6
RewriteRule ^qita/$ /modules/article/articlelist.php?class=7
RewriteRule ^xuanhuan/([0-9]+)/$ /modules/article/articlelist.php?class=1&page=$1
RewriteRule ^wuxia/([0-9]+)/$ /modules/article/articlelist.php?class=2&page=$1
RewriteRule ^dushi/([0-9]+)/$ /modules/article/articlelist.php?class=3&page=$1
RewriteRule ^lishi/([0-9]+)/$ /modules/article/articlelist.php?class=4&page=$1
RewriteRule ^youxi/([0-9]+)/$ /modules/article/articlelist.php?class=5&page=$1
RewriteRule ^kehuan/([0-9]+)/$ /modules/article/articlelist.php?class=6&page=$1
RewriteRule ^qita/([0-9]+)/$ /modules/article/articlelist.php?class=7&page=$1
RewriteRule ^fenlei/([0-9]+)_([0-9]+)/$ /modules/article/articlelist.php?class=$1&page=$2
RewriteRule ^top/([a-z]+)_([0-9]+)/$ /modules/article/toplist.php?sort=$1&page=$2
RewriteRule ^gengxin.html$ /modules/article/toplist.php?sort=lastupdate
RewriteRule ^paihang.html$ /modules/article/52mb_paihang.php
RewriteRule ^all.html$ /modules/article/52mb_quanbu.php
RewriteRule ^book/([0-9]+).html$ modules/article/articleinfo.php?id=$1
RewriteRule ^([0-9]+)/([0-9]+)/$ /modules/article/reader.php?aid=$2
RewriteRule ^([0-9]+)/([0-9]+)/index.html$ /modules/article/reader.php?aid=$2
RewriteRule ^([0-9]+)/([0-9]+)/([0-9]+).html$ /modules/article/reader.php?aid=$2&cid=$3
RewriteRule ^52mb/(.*).html$ /404.html
RewriteRule ^templates/(.*).html$ /404.html
RewriteRule ^themes/52mb/(.*).html$ /404.html
RewriteRule ^modules/article/templates/$ /404.html
RewriteRule ^modules/article/templates/(.*).html$ /404.html
RewriteRule ^zuijingenxin.html$ modules/article/toplist.php?sort=lastupdate

location / {
if ($http_host ~* "^(baidu\.com)(:80)?"){
rewrite ^/(.*) http://www.baidu.com/$1 redirect;
}
rewrite ^/([0-9]+)/([0-9]+)/$ /modules/article/reader.php?aid=$2;
rewrite ^/([0-9]+)/([0-9]+)/index.html$ /modules/article/reader.php?aid=$2;
rewrite ^/([0-9]+)/([0-9]+)/([0-9]+).html$ /modules/article/reader.php?aid=$2&cid=$3;
}

location /api {
rewrite ^/api/baidu_sitemap_([0-9]+).xml$ /api/baidu_sitemap.php?page=$1;;
}

location = /api/baidu_sitemap.xml {
rewrite ^(.*)$ /api/baidu_sitemap.php;;
}

location = /xuanhuan {
rewrite ^(.*)$ /modules/article/articlelist.php?class=1;
}

location = /wuxia {
rewrite ^(.*)$ /modules/article/articlelist.php?class=2;
}

location = /dushi {
rewrite ^(.*)$ /modules/article/articlelist.php?class=3;
}

location = /lishi {
rewrite ^(.*)$ /modules/article/articlelist.php?class=4;
}

location = /youxi {
rewrite ^(.*)$ /modules/article/articlelist.php?class=5;
}

location = /kehuan {
rewrite ^(.*)$ /modules/article/articlelist.php?class=6;
}

location = /qita {
rewrite ^(.*)$ /modules/article/articlelist.php?class=7;
}

location /xuanhuan {
rewrite ^/xuanhuan/([0-9]+)/$ /modules/article/articlelist.php?class=1&page=$1;
}

location /wuxia {
rewrite ^/wuxia/([0-9]+)/$ /modules/article/articlelist.php?class=2&page=$1;
}

location /dushi {
rewrite ^/dushi/([0-9]+)/$ /modules/article/articlelist.php?class=3&page=$1;
}

location /lishi {
rewrite ^/lishi/([0-9]+)/$ /modules/article/articlelist.php?class=4&page=$1;
}

location /youxi {
rewrite ^/youxi/([0-9]+)/$ /modules/article/articlelist.php?class=5&page=$1;
}

location /kehuan {
rewrite ^/kehuan/([0-9]+)/$ /modules/article/articlelist.php?class=6&page=$1;
}

location /qita {
rewrite ^/qita/([0-9]+)/$ /modules/article/articlelist.php?class=7&page=$1;
}

location /fenlei {
rewrite ^/fenlei/([0-9]+)_([0-9]+)/$ /modules/article/articlelist.php?class=$1&page=$2;
}

location /top {
rewrite ^/top/([a-z]+)_([0-9]+)/$ /modules/article/toplist.php?sort=$1&page=$2;
}

location = /gengxin.html {
rewrite ^(.*)$ /modules/article/toplist.php?sort=lastupdate;
}

location = /paihang.html {
rewrite ^(.*)$ /modules/article/52mb_paihang.php;
}

location = /all.html {
rewrite ^(.*)$ /modules/article/52mb_quanbu.php;
}

location /book {
rewrite ^/book/([0-9]+).html$ /modules/article/articleinfo.php?id=$1;
}

location /52mb {
rewrite ^/52mb/(.*).html$ /404.html;
}

location /templates {
rewrite ^/templates/(.*).html$ /404.html;
}

location /themes {
rewrite ^/themes/52mb/(.*).html$ /404.html;
}

location = /modules/article/templates {
rewrite ^(.*)$ /404.html;
}

location /modules {
rewrite ^/modules/article/templates/(.*).html$ /404.html;
}

location = /zuijingenxin.html {
rewrite ^(.*)$ /modules/article/toplist.php?sort=lastupdate;
}

© 版权声明
THE END
点赞0
抢沙发
头像
提交
头像

昵称

取消
昵称

    暂无评论内容

一言一语