全新版zencart 1.55 伪静态数据 url设定实例教程

阅读  ·  发布日期 2021-03-30 22:32  ·  admin
登陆zencart系统软件后台管理Configuration分往下拉SEO urls打开(官方网站英语版是必须此外按装软件的而接下来汉语版是集成化)以下图实际操作,英语版相近 伪静态数据标准编码以下 Options +FollowSymLinks
RewriteEngine on
RewriteBase /
# Disable if using "Categories as Directories"
#?cPath=$2 %{QUERY_STRING} [R=301,L]
# Enable only if using "Categories as Directories"
$ index\.php? products_id=$4 cpath=$2 %{QUERY_STRING} [L]
# Normal operation Ultimate SEO URLs
$ index\.php? products_id=$2 %{QUERY_STRING} [L]
# Disable if using "Categories as Directories"
#$ index\.php?main_page=index cPath=$2 %{QUERY_STRING} [L]
# [R=301,L]
# Enable only if using "Categories as Directories"
$ $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
$ index\.php?main_page=index manufacturers_id=$2 %{QUERY_STRING} [L]
$ index\.php?main_page=popup_image pID=$2 %{QUERY_STRING} [L]
$ index\.php?main_page=product_reviews products_id=$2 %{QUERY_STRING} [L]
$ index\.php? products_id=$2 %{QUERY_STRING} [L]
$ 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
$ 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] 假如遗失文档立即上边拷贝,ess放进zencart网站网站根目录立即应用 备注名称:表明网站放到网站根目录下 立即用RewriteBase /, 假如放到二级szenw文档夹名字,则RewriteBase /szenw/