全球主机交流论坛

标题: htaccess转nginx 求转 [打印本页]

作者: shineme    时间: 2013-6-27 15:14
标题: htaccess转nginx 求转
  1. ErrorDocument 404 /404.html

  2. RewriteRule ^(.*)-p([0-9]*)\.html$ /product-view.php?id=$2

  3. RewriteRule ^(.*)-n([0-9]*)\.html$ /news-view.php?id=$2
  4. RewriteRule ^(.*)-n([0-9]*)-([0-9]*)\.html$ /news-view.php?id=$2&page=$3

  5. RewriteRule ^(.*)-i([0-9]*)\.html$ /info-view.php?id=$2
  6. RewriteRule ^(.*)-i([0-9]*)-([0-9]*)\.html$ /info-view.php?id=$2&page=$3

  7. RewriteRule ^(.*)-nc([0-9]*)\.html$ /news.php?nclassid=$2
  8. RewriteRule ^(.*)-nc([0-9]*)-([0-9]*)\.html$ /news.php?nclassid=$2&page=$3
  9. RewriteRule ^(.*)-nc([0-9]*)-(.*)-([0-9]*)\.html$ /news.php?nclassid=$2&page=$4&query=$3

  10. RewriteRule ^reviews-([0-9]*)-([0-9]*)\.html$ /comment.php?pid=$1&page=$2

  11. RewriteRule ^(.*)-c([0-9]*)\.html$ /products.php?classid=$2
  12. RewriteRule ^(.*)-c([0-9]*)-([0-9]*)\.html$ /products.php?classid=$2&page=$3
  13. RewriteRule ^(.*)-c([0-9]*)-(.*)-([0-9]*)\.html$ /products.php?classid=$2&page=$4&query=$3


  14. RewriteRule ^(.*)-s([0-9]*)\.html$ /products.php?disp=$2
  15. RewriteRule ^(.*)-s([0-9]*)-([0-9]*)\.html$ /products.php?disp=$2&page=$3

  16. RewriteRule ^(.*)-ptag([0-9]*)\.html$ /tag-view.php?id=$2
  17. RewriteRule ^(.*)-ptag([0-9]*)-([0-9]*)\.html$ /tag-view.php?id=$2&page=$3

  18. RewriteRule ^attr-([0-9]*)-(.*)-([0-9]*)\.html$ /attribute.php?classid=$1&page=$3&tags=$2

  19. RewriteRule ^Monthly-Update-(.*)-([0-9]*)-([0-9]*)-([0-9]*)\.html$ /monthly-update.php?year=$3&page=$4&month=$2
  20. RewriteRule ^OEM-Products-([0-9]*)\.html$ /oem.php?page=$1
  21. RewriteRule ^video-([0-9]*)\.html$ /video.php?page=$1
  22. RewriteRule ^thumb_(.*)__(.*)__(.*)$ /image.php?pic=$3&style=$1&folder=$2

  23. RewriteRule ^(cnlogin|comment|download|error|feedback|quick-step|get-pwd|image-view|index|news|products|profile|register|search|shopcart|sitemap|step).html(.*)$ /$1.php$3
  24. </IfModule>
复制代码

作者: shineme    时间: 2013-6-27 15:16
主要这2个

RewriteRule ^video-([0-9]*)\.html$ /video.php?page=$1
RewriteRule ^thumb_(.*)__(.*)__(.*)$ /image.php?pic=$3&style=$1&folder=$2

用了网上的工具 转换失败
作者: shineme    时间: 2013-6-27 15:22
求顶
作者: ohmyga    时间: 2013-6-27 15:46
出点银子吧。。
作者: orvice    时间: 2013-6-27 15:46

作者: 身无分文的5毛钱    时间: 2013-6-27 18:43
        rewrite ^/(.*)-p([0-9]*).html$ /product-view.php?id=$2;
        rewrite ^/(.*)-n([0-9]*).html$ /news-view.php?id=$2;
        rewrite ^/(.*)-n([0-9]*)-([0-9]*).html$ /news-view.php?id=$2&page=$3;
        rewrite ^/(.*)-i([0-9]*).html$ /info-view.php?id=$2;
        rewrite ^/(.*)-i([0-9]*)-([0-9]*).html$ /info-view.php?id=$2&page=$3;
        rewrite ^/(.*)-nc([0-9]*).html$ /news.php?nclassid=$2;
        rewrite ^/(.*)-nc([0-9]*)-([0-9]*).html$ /news.php?nclassid=$2&page=$3;
        rewrite ^/(.*)-nc([0-9]*)-(.*)-([0-9]*).html$ /news.php?nclassid=$2&page=$4&query=$3;
        rewrite ^/reviews-([0-9]*)-([0-9]*).html$ /comment.php?pid=$1&page=$2;
        rewrite ^/(.*)-c([0-9]*).html$ /products.php?classid=$2;
        rewrite ^/(.*)-c([0-9]*)-([0-9]*).html$ /products.php?classid=$2&page=$3;
        rewrite ^/(.*)-c([0-9]*)-(.*)-([0-9]*).html$ /products.php?classid=$2&page=$4&query=$3;
        rewrite ^/(.*)-s([0-9]*).html$ /products.php?disp=$2;
        rewrite ^/(.*)-s([0-9]*)-([0-9]*).html$ /products.php?disp=$2&page=$3;
        rewrite ^/(.*)-ptag([0-9]*).html$ /tag-view.php?id=$2;
        rewrite ^/(.*)-ptag([0-9]*)-([0-9]*).html$ /tag-view.php?id=$2&page=$3;
        rewrite ^/attr-([0-9]*)-(.*)-([0-9]*).html$ /attribute.php?classid=$1&page=$3&tags=$2;
        rewrite ^/Monthly-Update-(.*)-([0-9]*)-([0-9]*)-([0-9]*).html$ /monthly-update.php?year=$3&page=$4&month=$2;
        rewrite ^/OEM-Products-([0-9]*).html$ /oem.php?page=$1;
        rewrite ^/video-([0-9]*).html$ /video.php?page=$1;
        rewrite ^/thumb_(.*)__(.*)__(.*)$ /image.php?pic=$3&style=$1&folder=$2;
        rewrite ^/(cnlogin|comment|download|error|feedback|quick-step|get-pwd|image-view|index|news|products|profile|register|search|shopcart|sitemap|step).html(.*)$ /$1.php$3;


作者: 雨宫音羽    时间: 2013-6-27 19:02
免费小工在楼上
作者: rqliang    时间: 2013-6-27 19:04
帮顶我唔 识




欢迎光临 全球主机交流论坛 (https://gebi.eu.org/) Powered by Discuz! X3.4