联系电话:0755-27515592
最新动态:

zencart教程

最新版zencart 1.55 伪静态 url设置教程

点击数:25102018-07-07 18:52:57 来源: 外贸网站建设,深圳外贸网站建设,深圳网站建设,外贸商城网站制作-亿恩科技

zencart如何开启伪静态

登录zencart系统后台Configuration分下拉SEO urls开启(官网英文版是需要另外按装插件的而简体中文版是集成)如下图操作,英文版类似

伪静态规则代码如下

Options +FollowSymLinks
RewriteEngine on
RewriteBase /
# Disable if using "Categories as Directories"
#RewriteRule ^(.*)-c-([0-9_]+)/(.*)-p-([0-9]+)\.html$ $3-p-$4\.html?cPath=$2&%{QUERY_STRING} [R=301,L]
# Enable only if using "Categories as Directories"
RewriteRule ^(.*)-c-([0-9_]+)/(.*)-p-([0-9]+)\.html$ index\.php?main_page=product_info&products_id=$4&cpath=$2&%{QUERY_STRING} [L]
# Normal operation Ultimate SEO URLs
RewriteRule ^(.*)-p-([0-9]+)\.html$ index\.php?main_page=product_info&products_id=$2&%{QUERY_STRING} [L]
# Disable if using "Categories as Directories"
#RewriteRule ^(.*)-c-([0-9_]+)\.html$ index\.php?main_page=index&cPath=$2&%{QUERY_STRING} [L]
#RewriteRule ^(.*)-c-([0-9_]+)/$ $1-c-$2\.html [R=301,L]
# Enable only if using "Categories as Directories"
RewriteRule ^(.*)-c-([0-9_]+)/?\.html$ $1-c-$2/ [R=301,L]
RewriteRule ^(.*)-c-([0-9_]+)$ %{REQUEST_URI}/ [R=301,L]
RewriteRule ^(.*)-c-([0-9_]+)/$ index\.php?main_page=index&cPath=$2&%{QUERY_STRING} [L]
# Normal operation Ultimate SEO URLs
RewriteRule ^(.*)-m-([0-9]+)\.html$ index\.php?main_page=index&manufacturers_id=$2&%{QUERY_STRING} [L]
RewriteRule ^(.*)-pi-([0-9]+)\.html$ index\.php?main_page=popup_image&pID=$2&%{QUERY_STRING} [L]
RewriteRule ^(.*)-pr-([0-9]+)\.html$ index\.php?main_page=product_reviews&products_id=$2&%{QUERY_STRING} [L]
RewriteRule ^(.*)-pri-([0-9]+)\.html$ index\.php?main_page=product_reviews_info&products_id=$2&%{QUERY_STRING} [L]
RewriteRule ^(.*)-ezp-([0-9]+)\.html$ index\.php?main_page=page&id=$2&%{QUERY_STRING} [L]
# All other pages
# Don't rewrite real files or directories
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*).html$ index\.php?main_page=$1&%{QUERY_STRING} [L]
# Handle when a resource is not found (404 Error Page)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index\.php?main_page=page_not_found&%{QUERY_STRING} [L]

如果丢失文件直接上面复制,保存成.htaccess放到zencart网站根目录直接使用

备注:说明网站放在根目录下 直接用RewriteBase /, 如果放在二级szenw文件夹名称,则RewriteBase /szenw/




【责任编辑:(Top) 返回页面顶端
贴心
全国7×24小时客服热线
安全
病毒杀除率高于99%
稳定
网站可用性高于99.9%
实力
服务68家上市企业及集团公司
亿恩科技手机站
关注亿恩科技微信

亿恩科技—企业信息化一站式服务专家


Copyright © 2008- 深圳市亿恩科技有限公司版权所有 粤ICP备15056041号

联系我们 | 常见问题 | 在线留言 | 支付方式 | 软件开发 | 我的观点 | 资质荣誉 | 服务流程