宝塔10周年开年大促,年度钜惠,先领红包再下单,享受折上折,还有抽奖!查看活动
当前位置:论坛首页 > Linux面板 > 求助

Nginx,zencart的伪静态规则

发表在 Linux面板2017-12-21 12:06 [复制链接] 1 2834

我想问问,Nginx,zencart的伪静态规则大家有么
怎么我在网上搜到的规则贴上去不行啊
还是404

使用道具 举报 只看该作者 回复
发表于 2017-12-21 15:04:43 | 显示全部楼层
  1. location / {  
  2.   
  3. if (!-e $request_filename)  
  4. {  
  5. #————————zen-cart start——————  
  6.   
  7. # From Ultimate SEO URLs  
  8. rewrite "^(.*)-p-(.*).html" /index.php?main_page=product_info&products_id=$2&% last;  
  9. rewrite "^(.*)-c-(.*).html" /index.php?main_page=index&cPath=$2&% last;  
  10. rewrite "^(.*)-m-([0-9]+).html" /index.php?main_page=index&manufacturers_id=$2&% last;  
  11. rewrite "^(.*)-pi-([0-9]+).html" /index.php?main_page=popup_image&pID=$2&% last;  
  12. rewrite "^(.*)-pr-([0-9]+).html" /index.php?main_page=product_reviews&products_id=$2&% last;  
  13. rewrite "^(.*)-pri-([0-9]+).html" /index.php?main_page=product_reviews_info&products_id=$2&% last;  
  14.   
  15. # For Open Operations Info Manager  
  16. rewrite "^(.*)-i-([0-9]+).html" /index.php?main_page=info_manager&pages_id=$2&% last;  
  17.   
  18. # For dreamscape’s News & Articles Manager  
  19. rewrite "^news/?" /index.php?main_page=news&% last;  
  20. rewrite "^news/rss.xml" /index.php?main_page=news_rss&% last;  
  21. rewrite "^news/archive/?" /index.php?main_page=news_archive&% last;  
  22. rewrite "^news/([0-9]{4})-([0-9]{2})-([0-9]{2}).html" /index.php?main_page=news&date=$1-$2-$3&% last;  
  23. rewrite "^news/archive/([0-9]{4})-([0-9]{2}).html" /index.php?main_page=news_archive&date=$1-$2&% last;  
  24. rewrite "^news/(.*)-a-([0-9]+)-comments.html" /index.php?main_page=news_comments&article_id=$2&% last;  
  25. rewrite "^news/(.*)-a-([0-9]+).html" /index.php?main_page=news_article&article_id=$2&% last;  
  26.   
  27. # All other pages  
  28. # Don’t rewrite real files or directories  
  29. #RewriteCond %{REQUEST_FILENAME} !-f [NC]  
  30. #RewriteCond %{REQUEST_FILENAME} !-d  
  31. rewrite "^(.*).html" /index.php?main_page=$1&% last;  
  32. #—————————-zen-cart end—————–  
  33.   
  34. }  
  35. }  
复制代码


----------------------------------------------------------------------------------------------------
菜鸟团队技术博客点击联系
使用道具 举报 回复 支持 反对
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

紧急运维服务

响应时间:3分钟

问题处理方式:宝塔专家1对1服务

工作时间:工作日:9:00 - 18:30

宝塔专业团队为您解决服务器疑难问题

点击联系技术分析

工作时间:09:00至18:30

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