淘主机论坛

 找回密码
 成为淘友

QQ登录

只需一步,快速开始

KT服务器促销中 100M带宽 10T流量 超值传送门:会员注册及发帖规则 发帖看过来
查看: 1623|回复: 1

[Web] zencart伪静态规则之cpanel里的.htacess代码

[复制链接]
发表于 2012-3-23 15:07:19 | 显示全部楼层 |阅读模式
不必费尽在百度Google找啦,拿去就用!代码如下:


  1. ##### NOTE: Replace /shop/ with the relative web path of your catalog in the “Rewrite Base” line below:

  2. Options +FollowSymLinks
  3. RewriteEngine On
  4. RewriteBase /

  5. # From Ultimate SEO URLs
  6. RewriteRule ^(.*)-p-(.*).html$ index\.php?main_page=product_info&products_id=$2&%{QUERY_STRING} [L]
  7. RewriteRule ^(.*)-c-(.*).html$ index\.php?main_page=index&cPath=$2&%{QUERY_STRING} [L]
  8. RewriteRule ^(.*)-m-([0-9]+).html$ index\.php?main_page=index&manufacturers_id=$2&%{QUERY_STRING} [L]
  9. RewriteRule ^(.*)-pi-([0-9]+).html$ index\.php?main_page=popup_image&pID=$2&%{QUERY_STRING} [L]
  10. RewriteRule ^(.*)-pr-([0-9]+).html$ index\.php?main_page=product_reviews&products_id=$2&%{QUERY_STRING} [L]
  11. RewriteRule ^(.*)-pri-([0-9]+).html$ index\.php?main_page=product_reviews_info&products_id=$2&%{QUERY_STRING} [L]

  12. # For Open Operations Info Manager
  13. RewriteRule ^(.*)-i-([0-9]+).html$ index\.php?main_page=info_manager&pages_id=$2&%{QUERY_STRING} [L]

  14. # For dreamscape’s News & Articles Manager
  15. RewriteRule ^news/?$ index\.php?main_page=news&%{QUERY_STRING} [L]
  16. RewriteRule ^news/rss.xml$ index\.php?main_page=news_rss&%{QUERY_STRING} [L]
  17. RewriteRule ^news/archive/?$ index\.php?main_page=news_archive&%{QUERY_STRING} [L]
  18. RewriteRule ^news/([0-9]{4})-([0-9]{2})-([0-9]{2}).html$ index\.php?main_page=news&date=$1-$2-$3&%{QUERY_STRING} [L]
  19. RewriteRule ^news/archive/([0-9]{4})-([0-9]{2}).html$ index\.php?main_page=news_archive&date=$1-$2&%{QUERY_STRING} [L]
  20. RewriteRule ^news/(.*)-a-([0-9]+)-comments.html$ index\.php?main_page=news_comments&article_id=$2&%{QUERY_STRING} [L]
  21. RewriteRule ^news/(.*)-a-([0-9]+).html$ index\.php?main_page=news_article&article_id=$2&%{QUERY_STRING} [L]

  22. # All other pages
  23. # Don’t rewrite real files or directories
  24. RewriteCond %{REQUEST_FILENAME} !-f [NC]
  25. RewriteCond %{REQUEST_FILENAME} !-d
  26. RewriteRule ^(.*).html$ index\.php?main_page=$1&%{QUERY_STRING} [L]
复制代码
 楼主| 发表于 2012-3-23 15:07:57 | 显示全部楼层
您需要登录后才可以回帖 登录 | 成为淘友

本版积分规则

小黑屋|手机版|Archiver|淘主机

GMT+8, 2024-12-23 17:36

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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