如何实现ECShop伪静态
2个回答
2018-08-02 · 知道合伙人软件行家
关注
展开全部
1、首先得保证的服务器支持URL伪静态,有的空间默认就支持,有的需要设置,如果不明白建议问下空间商。
2、还要分两种情况,一是LINUX服务器,一种是WIN服务器,设置方法是不同的。
下面先说下LINUX服务器的设置步骤:
第一步:商店设置-基本设置 选择简重写好可
第二步:FTP连接
在ECSHOP根目录找到htaccess.txt,将其更名为.htaccess
第三步:清缓存,刷新首页再测试
2、还要分两种情况,一是LINUX服务器,一种是WIN服务器,设置方法是不同的。
下面先说下LINUX服务器的设置步骤:
第一步:商店设置-基本设置 选择简重写好可
第二步:FTP连接
在ECSHOP根目录找到htaccess.txt,将其更名为.htaccess
第三步:清缓存,刷新首页再测试
展开全部
具体操作如下:
1.打开主机91控制面板,“文件管理器”,在网站wwwroot下打开web.config文件。
2.将web.config文件copy到本地记事本或者Notepad++进行编辑。注意存在的web.config文件不要删除,否则会导致网站无法访问。
3.将下列ECShop静态化代码添加至红色位置,确保添加正确。
ECShop静态化代码:
<rewrite>
<rules>
<rule name="Goods" stopProcessing="true">
<match url="^goods-([0-9]+).html" />
<action type="Rewrite" url="goods.php?id={R:1}" />
</rule>
<rule name="Feed" stopProcessing="true">
<match url="^feed.xml" />
<action type="Rewrite" url="feed.php" />
</rule>
<rule name="Feed-C" stopProcessing="true">
<match url="^feed-c([0-9]+).xml" />
<action type="Rewrite" url="feed.php?cat={R:1}" />
</rule>
<rule name="Feed-B" stopProcessing="true">
<match url="^feed-b([0-9]+).xml" />
<action type="Rewrite" url="feed.php?brand={R:1}" />
</rule>
<rule name="Articles" stopProcessing="true">
<match url="^article-([0-9]+).html" />
<action type="Rewrite" url="article.php?id={R:1}" />
</rule>
<rule name="Search" stopProcessing="true">
<match url="^tag-([_0-9a-z-]+).html" />
<action type="Rewrite" url="search.php?keywords={R:1}" />
</rule>
<rule name="Snatch" stopProcessing="true">
<match url="^snatch-([0-9]+).html" />
<action type="Rewrite" url="snatch.php?id={R:1}" />
</rule>
<rule name="Group_Buy" stopProcessing="true">
<match url="^group_buy-([0-9]+).html" />
<action type="Rewrite" url="group_buy.php?act=view&id={R:1}" />
</rule>
<rule name="Auction" stopProcessing="true">
<match url="^auction-([0-9]+).html" />
<action type="Rewrite" url="auction.php?act=view&id={R:1}" />
</rule>
<rule name="Brand1" stopProcessing="true">
<match url="^brand-([0-9]+).html" />
<action type="Rewrite" url="brand.php?id={R:1}" />
</rule>
<rule name="Brand2" stopProcessing="true">
<match url="^brand-([0-9]+)-c([0-9]+).html" />
<action type="Rewrite" url="brand.php?id={R:1}&cat={R:2}" />
</rule>
<rule name="Brand3" stopProcessing="true">
<match url="^brand-([0-9]+)-c([0-9]+)-([0-9]+).html" />
<action type="Rewrite" url="brand.php?id={R:1}&cat={R:2}&page={R:3}" />
</rule>
<rule name="Brand4" stopProcessing="true">
<match url="^brand-([0-9]+)-c([0-9]+)-([0-9]+)-(.+)-([_0-9a-z-]+).html" />
<action type="Rewrite" url="brand.php?id={R:1}&cat={R:2}&page={R:3}&sort={R:4}&order={R:5}" />
</rule>
<rule name="Cat1" stopProcessing="true">
<match url="^article_cat-([0-9]+).html" />
<action type="Rewrite" url="article_cat.php?id={R:1}" />
</rule>
<rule name="Cat2" stopProcessing="true">
<match url="^article_cat-([0-9]+)-([0-9]+).html" />
<action type="Rewrite" url="article_cat.php?id={R:1}&page={R:2}" />
</rule>
<rule name="Cat3" stopProcessing="true">
<match url="^article_cat-([0-9]+)-([0-9]+)-(.+)-([_0-9a-z-]+).html" />
<action type="Rewrite" url="article_cat.php?id={R:1}&page={R:2}&sort={R:3}&order={R:4}" />
</rule>
<rule name="Category1" stopProcessing="true">
<match url="^category-([0-9]+).html" />
<action type="Rewrite" url="category.php?id={R:1}" />
</rule>
<rule name="Category2" stopProcessing="true">
<match url="^category-([0-9]+)-b([0-9]+).html" />
<action type="Rewrite" url="category.php?id={R:1}&brand={R:2}" />
</rule>
<rule name="Category3" stopProcessing="true">
<match url="^category-([0-9]+)-b([0-9]+)-([0-9]+).html" />
<action type="Rewrite" url="category.php?id={R:1}&brand={R:2}&page={R:3}" />
</rule>
<rule name="Category4" stopProcessing="true">
<match url="^category-([0-9]+)-b([0-9]+)-([0-9]+)-(.+)-([_0-9a-z-]+).html" />
<action type="Rewrite" url="category.php?id={R:1}&brand={R:2}&page={R:3}&sort={R:4}&order={R:5}" />
</rule>
<rule name="Category5" stopProcessing="true">
<match url="^category-([0-9]+)-b([0-9]+)-min([0-9]+)-max([0-9]+)-attr([_0-9a-z-]+).html" />
<action type="Rewrite" url="category.php?id={R:1}&brand={R:2}&price_min={R:3}&price_max={R:4}&filter_attr={R:5}" />
</rule>
<rule name="Category6" stopProcessing="true">
<match url="^category-([0-9]+)-b([0-9]+)-min([0-9]+)-max([0-9]+)-attr([_0-9a-z-]+)-([0-9]+)-(.+)-([_0-9a-z-]+).html" />
<action type="Rewrite" url="category.php?id={R:1}&brand={R:2}&price_min={R:3}&price_max={R:4}&filter_attr={R:5}&page={R:6}&sort={R:7}&order={R:8}" />
</rule>
</rules>
</rewrite>
4.添加完毕之后将整个web.config覆盖控制面板中的web.config文件。
5.登录ECShop后台,开启静态化。
6.静态化设置成功,访问产品页面。
1.打开主机91控制面板,“文件管理器”,在网站wwwroot下打开web.config文件。
2.将web.config文件copy到本地记事本或者Notepad++进行编辑。注意存在的web.config文件不要删除,否则会导致网站无法访问。
3.将下列ECShop静态化代码添加至红色位置,确保添加正确。
ECShop静态化代码:
<rewrite>
<rules>
<rule name="Goods" stopProcessing="true">
<match url="^goods-([0-9]+).html" />
<action type="Rewrite" url="goods.php?id={R:1}" />
</rule>
<rule name="Feed" stopProcessing="true">
<match url="^feed.xml" />
<action type="Rewrite" url="feed.php" />
</rule>
<rule name="Feed-C" stopProcessing="true">
<match url="^feed-c([0-9]+).xml" />
<action type="Rewrite" url="feed.php?cat={R:1}" />
</rule>
<rule name="Feed-B" stopProcessing="true">
<match url="^feed-b([0-9]+).xml" />
<action type="Rewrite" url="feed.php?brand={R:1}" />
</rule>
<rule name="Articles" stopProcessing="true">
<match url="^article-([0-9]+).html" />
<action type="Rewrite" url="article.php?id={R:1}" />
</rule>
<rule name="Search" stopProcessing="true">
<match url="^tag-([_0-9a-z-]+).html" />
<action type="Rewrite" url="search.php?keywords={R:1}" />
</rule>
<rule name="Snatch" stopProcessing="true">
<match url="^snatch-([0-9]+).html" />
<action type="Rewrite" url="snatch.php?id={R:1}" />
</rule>
<rule name="Group_Buy" stopProcessing="true">
<match url="^group_buy-([0-9]+).html" />
<action type="Rewrite" url="group_buy.php?act=view&id={R:1}" />
</rule>
<rule name="Auction" stopProcessing="true">
<match url="^auction-([0-9]+).html" />
<action type="Rewrite" url="auction.php?act=view&id={R:1}" />
</rule>
<rule name="Brand1" stopProcessing="true">
<match url="^brand-([0-9]+).html" />
<action type="Rewrite" url="brand.php?id={R:1}" />
</rule>
<rule name="Brand2" stopProcessing="true">
<match url="^brand-([0-9]+)-c([0-9]+).html" />
<action type="Rewrite" url="brand.php?id={R:1}&cat={R:2}" />
</rule>
<rule name="Brand3" stopProcessing="true">
<match url="^brand-([0-9]+)-c([0-9]+)-([0-9]+).html" />
<action type="Rewrite" url="brand.php?id={R:1}&cat={R:2}&page={R:3}" />
</rule>
<rule name="Brand4" stopProcessing="true">
<match url="^brand-([0-9]+)-c([0-9]+)-([0-9]+)-(.+)-([_0-9a-z-]+).html" />
<action type="Rewrite" url="brand.php?id={R:1}&cat={R:2}&page={R:3}&sort={R:4}&order={R:5}" />
</rule>
<rule name="Cat1" stopProcessing="true">
<match url="^article_cat-([0-9]+).html" />
<action type="Rewrite" url="article_cat.php?id={R:1}" />
</rule>
<rule name="Cat2" stopProcessing="true">
<match url="^article_cat-([0-9]+)-([0-9]+).html" />
<action type="Rewrite" url="article_cat.php?id={R:1}&page={R:2}" />
</rule>
<rule name="Cat3" stopProcessing="true">
<match url="^article_cat-([0-9]+)-([0-9]+)-(.+)-([_0-9a-z-]+).html" />
<action type="Rewrite" url="article_cat.php?id={R:1}&page={R:2}&sort={R:3}&order={R:4}" />
</rule>
<rule name="Category1" stopProcessing="true">
<match url="^category-([0-9]+).html" />
<action type="Rewrite" url="category.php?id={R:1}" />
</rule>
<rule name="Category2" stopProcessing="true">
<match url="^category-([0-9]+)-b([0-9]+).html" />
<action type="Rewrite" url="category.php?id={R:1}&brand={R:2}" />
</rule>
<rule name="Category3" stopProcessing="true">
<match url="^category-([0-9]+)-b([0-9]+)-([0-9]+).html" />
<action type="Rewrite" url="category.php?id={R:1}&brand={R:2}&page={R:3}" />
</rule>
<rule name="Category4" stopProcessing="true">
<match url="^category-([0-9]+)-b([0-9]+)-([0-9]+)-(.+)-([_0-9a-z-]+).html" />
<action type="Rewrite" url="category.php?id={R:1}&brand={R:2}&page={R:3}&sort={R:4}&order={R:5}" />
</rule>
<rule name="Category5" stopProcessing="true">
<match url="^category-([0-9]+)-b([0-9]+)-min([0-9]+)-max([0-9]+)-attr([_0-9a-z-]+).html" />
<action type="Rewrite" url="category.php?id={R:1}&brand={R:2}&price_min={R:3}&price_max={R:4}&filter_attr={R:5}" />
</rule>
<rule name="Category6" stopProcessing="true">
<match url="^category-([0-9]+)-b([0-9]+)-min([0-9]+)-max([0-9]+)-attr([_0-9a-z-]+)-([0-9]+)-(.+)-([_0-9a-z-]+).html" />
<action type="Rewrite" url="category.php?id={R:1}&brand={R:2}&price_min={R:3}&price_max={R:4}&filter_attr={R:5}&page={R:6}&sort={R:7}&order={R:8}" />
</rule>
</rules>
</rewrite>
4.添加完毕之后将整个web.config覆盖控制面板中的web.config文件。
5.登录ECShop后台,开启静态化。
6.静态化设置成功,访问产品页面。
本回答被网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询