全球主机交流论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

CeraNetworks网络延迟测速工具IP归属甄别会员请立即修改密码
查看: 658|回复: 7
打印 上一主题 下一主题

htaccess转nginx 求转

[复制链接]
跳转到指定楼层
1#
发表于 2013-6-27 15:14:32 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
  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>
复制代码
2#
 楼主| 发表于 2013-6-27 15:16:25 | 只看该作者
主要这2个

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

用了网上的工具 转换失败
3#
 楼主| 发表于 2013-6-27 15:22:02 | 只看该作者
求顶
4#
发表于 2013-6-27 15:46:23 | 只看该作者
出点银子吧。。
5#
发表于 2013-6-27 15:46:57 | 只看该作者
6#
发表于 2013-6-27 18:43:29 | 只看该作者
        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;

7#
发表于 2013-6-27 19:02:48 | 只看该作者
免费小工在楼上
8#
发表于 2013-6-27 19:04:04 | 只看该作者
帮顶我唔 识
您需要登录后才可以回帖 登录 | 注册

本版积分规则

Archiver|手机版|小黑屋|全球主机交流论坛

GMT+8, 2025-10-12 02:04 , Processed in 0.075801 second(s), 9 queries , Gzip On, MemCache On.

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表