当前位置:论坛首页 > Linux面板 > 求助

Nginx,zencart的伪静态规则

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

我想问问,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. }  
复制代码


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

本版积分规则

普通问题处理

论坛响应时间:72小时

问题处理方式:排队(仅解答)

工作时间:白班:9:00 - 18:00

紧急问题处理

论坛响应时间:10分钟

问题处理方式:1对1处理(优先)

工作时间:白班:9:00 - 18:00

工作时间:晚班:18:00 - 24:00

立即付费处理

工作时间:09:00至24:00

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