shineme 发表于 2013-6-27 15:14:32

htaccess转nginx 求转

[*]ErrorDocument 404 /404.html
[*]
[*]RewriteRule ^(.*)-p(*)\.html$ /product-view.php?id=$2
[*]
[*]RewriteRule ^(.*)-n(*)\.html$ /news-view.php?id=$2
[*]RewriteRule ^(.*)-n(*)-(*)\.html$ /news-view.php?id=$2&page=$3
[*]
[*]RewriteRule ^(.*)-i(*)\.html$ /info-view.php?id=$2
[*]RewriteRule ^(.*)-i(*)-(*)\.html$ /info-view.php?id=$2&page=$3
[*]
[*]RewriteRule ^(.*)-nc(*)\.html$ /news.php?nclassid=$2
[*]RewriteRule ^(.*)-nc(*)-(*)\.html$ /news.php?nclassid=$2&page=$3
[*]RewriteRule ^(.*)-nc(*)-(.*)-(*)\.html$ /news.php?nclassid=$2&page=$4&query=$3
[*]
[*]RewriteRule ^reviews-(*)-(*)\.html$ /comment.php?pid=$1&page=$2
[*]
[*]RewriteRule ^(.*)-c(*)\.html$ /products.php?classid=$2
[*]RewriteRule ^(.*)-c(*)-(*)\.html$ /products.php?classid=$2&page=$3
[*]RewriteRule ^(.*)-c(*)-(.*)-(*)\.html$ /products.php?classid=$2&page=$4&query=$3
[*]
[*]
[*]RewriteRule ^(.*)-s(*)\.html$ /products.php?disp=$2
[*]RewriteRule ^(.*)-s(*)-(*)\.html$ /products.php?disp=$2&page=$3
[*]
[*]RewriteRule ^(.*)-ptag(*)\.html$ /tag-view.php?id=$2
[*]RewriteRule ^(.*)-ptag(*)-(*)\.html$ /tag-view.php?id=$2&page=$3
[*]
[*]RewriteRule ^attr-(*)-(.*)-(*)\.html$ /attribute.php?classid=$1&page=$3&tags=$2
[*]
[*]RewriteRule ^Monthly-Update-(.*)-(*)-(*)-(*)\.html$ /monthly-update.php?year=$3&page=$4&month=$2
[*]RewriteRule ^OEM-Products-(*)\.html$ /oem.php?page=$1
[*]RewriteRule ^video-(*)\.html$ /video.php?page=$1
[*]RewriteRule ^thumb_(.*)__(.*)__(.*)$ /image.php?pic=$3&style=$1&folder=$2
[*]
[*]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
[*]复制代码

shineme 发表于 2013-6-27 15:16:25

主要这2个

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

用了网上的工具 转换失败

shineme 发表于 2013-6-27 15:22:02

求顶

ohmyga 发表于 2013-6-27 15:46:23

出点银子吧。。
008.gif

orvice 发表于 2013-6-27 15:46:57


003.gif

身无分文的5毛钱 发表于 2013-6-27 18:43:29

      rewrite ^/(.*)-p(*).html$ /product-view.php?id=$2;
      rewrite ^/(.*)-n(*).html$ /news-view.php?id=$2;
      rewrite ^/(.*)-n(*)-(*).html$ /news-view.php?id=$2&page=$3;
      rewrite ^/(.*)-i(*).html$ /info-view.php?id=$2;
      rewrite ^/(.*)-i(*)-(*).html$ /info-view.php?id=$2&page=$3;
      rewrite ^/(.*)-nc(*).html$ /news.php?nclassid=$2;
      rewrite ^/(.*)-nc(*)-(*).html$ /news.php?nclassid=$2&page=$3;
      rewrite ^/(.*)-nc(*)-(.*)-(*).html$ /news.php?nclassid=$2&page=$4&query=$3;
      rewrite ^/reviews-(*)-(*).html$ /comment.php?pid=$1&page=$2;
      rewrite ^/(.*)-c(*).html$ /products.php?classid=$2;
      rewrite ^/(.*)-c(*)-(*).html$ /products.php?classid=$2&page=$3;
      rewrite ^/(.*)-c(*)-(.*)-(*).html$ /products.php?classid=$2&page=$4&query=$3;
      rewrite ^/(.*)-s(*).html$ /products.php?disp=$2;
      rewrite ^/(.*)-s(*)-(*).html$ /products.php?disp=$2&page=$3;
      rewrite ^/(.*)-ptag(*).html$ /tag-view.php?id=$2;
      rewrite ^/(.*)-ptag(*)-(*).html$ /tag-view.php?id=$2&page=$3;
      rewrite ^/attr-(*)-(.*)-(*).html$ /attribute.php?classid=$1&page=$3&tags=$2;
      rewrite ^/Monthly-Update-(.*)-(*)-(*)-(*).html$ /monthly-update.php?year=$3&page=$4&month=$2;
      rewrite ^/OEM-Products-(*).html$ /oem.php?page=$1;
      rewrite ^/video-(*).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:48

免费小工在楼上

rqliang 发表于 2013-6-27 19:04:04

帮顶我唔 识
页: [1]
查看完整版本: htaccess转nginx 求转