ecshop如何设置伪静态(针对虚拟空间虚拟主机)
发布:smiling 来源: PHP粉丝网 添加日期:2014-06-14 16:33:20 浏览: 评论:0
找到“系统设置”栏目下的“商店设置”,然后选择“基本设置”,然后在下面“URL重写”选项中选择“简单重写”,再“确定”.
然后在网站根目录将htaccess.txt文件名 改成 .htaccess
然后在空间根目录下(就是index.php所在的目录下),建立httpd.ini文件,然后将下面的代码复制到文件中:
- [ISAPI_Rewrite]
- # ECSHOP
- RewriteRule /index.html /index.php
- RewriteRule /default.html /index.php
- RewriteRule /ecshop/feed.xml /ecshop/feed.php
- #RewriteRule /ecshop/category-([0-9]+)-b([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+)(.*)\.html$ /ecshop/category.php?id=$1&brand=$2&page=$3&sort=$4&order=$5
- RewriteRule ^(.*)/category-([0-9]+)-b([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+)(.*)\.html$ $1/category\.php\?id=$2&brand=$3&page=$4&sort=$5&order=$6
- #RewriteRule /ecshop/category-([0-9]+)-b([0-9]+)-([0-9]+)(.*)\.html$ /ecshop/category.php?id=$1&brand=$2&page=$3
- RewriteRule ^(.*)/category-([0-9]+)-b([0-9]+)-([0-9]+)(.*)\.html$ $1/category\.php\?id=$2&brand=$3&page=$4
- #RewriteRule /ecshop/category-([0-9]+)-b([0-9]+)(.*)\.html$ /ecshop/category.php?id=$1&brand=$2
- RewriteRule ^(.*)/category-([0-9]+)-b([0-9]+)(.*)\.html$ $1/category\.php\?id=$2&brand=$3
- #RewriteRule /ecshop/category-([0-9]+)(.*)\.html$ /ecshop/category.php?id=$1
- RewriteRule ^(.*)/category-([0-9]+)(.*)\.html$ $1/category\.php\?id=$2
- #RewriteRule /ecshop/goods-([0-9]+)(.*)\.html$ /ecshop/goods.php?id=$1
- RewriteRule ^(.*)/goods-([0-9]+)(.*)\.html$ $1/goods\.php\?id=$2
- #RewriteRule /ecshop/article_cat-([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+)(.*)\.html$ /ecshop/article_cat.php?id=$1&page=$2&sort=$3&order=$4
- RewriteRule ^(.*)/article_cat-([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+)(.*)\.html$ $1/article_cat\.php\?id=$2&page=$3&sort=$4&order=$5
- #RewriteRule /ecshop/article_cat-([0-9]+)-([0-9]+)(.*)\.html$ /ecshop/article_cat.php?id=$1&page=$2
- RewriteRule ^(.*)/article_cat-([0-9]+)-([0-9]+)(.*)\.html$ $1/article_cat\.php\?id=$2&page=$3
- #RewriteRule /ecshop/article_cat-([0-9]+)(.*)\.html$ /ecshop/article_cat.php?id=$1
- RewriteRule ^(.*)/article_cat-([0-9]+)(.*)\.html$ $1/article_cat\.php\?id=$2
- #RewriteRule /ecshop/article-([0-9]+)(.*)\.html$ /ecshop/article.php?id=$1
- RewriteRule ^(.*)/article-([0-9]+)(.*)\.html$ $1/article\.php\?id=$2
- #RewriteRule /ecshop/brand-([0-9]+)-c([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+)\.html /ecshop/brand.php?id=$1&cat=$2&page=$3&sort=$4&order=$5
- RewriteRule ^(.*)/brand-([0-9]+)-c([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+)(.*)\.html $1/brand\.php\?id=$2&cat=$3&page=$4&sort=$5&order=$6
- #RewriteRule /ecshop/brand-([0-9]+)-c([0-9]+)-([0-9]+)(.*)\.html /ecshop/brand.php?id=$1&cat=$2&page=$3
- RewriteRule ^(.*)/brand-([0-9]+)-c([0-9]+)-([0-9]+)(.*)\.html $1/brand\.php\?id=$2&cat=$3&page=$4
- #RewriteRule /ecshop/brand-([0-9]+)-c([0-9]+)(.*)\.html /ecshop/brand.php?id=$1&cat=$2
- RewriteRule ^(.*)/brand-([0-9]+)-c([0-9]+)(.*)\.html $1/brand\.php\?id=$2&cat=$3
- #RewriteRule /ecshop/brand-([0-9]+)(.*)\.html /ecshop/brand.php?id=$1
- RewriteRule ^(.*)/brand-([0-9]+)(.*)\.html $1/brand\.php\?id=$2
- #RewriteRule /ecshop/tag-(.*)\.html /ecshoparch.php?keywords=$1
- RewriteRule ^(.*)/tag-(.*)\.html $1arch\.php\?keywords=$2
最后保存,上传,就完成了ecshop伪静态的基本设置.
Tags: 虚拟空间 伪静态 虚拟主机
相关文章
- ·ecshop伪静态.htaccess的规则代码(2014-06-14)
- ·ecshop中iis/apache伪静态规则配置示例(2014-11-28)
- ·windows系统iis运行环境下ecshop商城设置伪静态的方法(2015-09-28)
- ·ecshop iis虚拟主机301重定向以及url重写代码(2014-06-19)
推荐文章
热门文章
最新评论文章
- 写给考虑创业的年轻程序员(10)
- PHP新手上路(一)(7)
- 惹恼程序员的十件事(5)
- PHP邮件发送例子,已测试成功(5)
- 致初学者:PHP比ASP优秀的七个理由(4)
- PHP会被淘汰吗?(4)
- PHP新手上路(四)(4)
- 如何去学习PHP?(2)
- 简单入门级php分页代码(2)
- php中邮箱email 电话等格式的验证(2)