分享

写回答

发帖

[提问] gd的win主机上面安装ecshop如何设置静太rulrewrite呢?

GoDaddy GoDaddy 2385 人阅读 | 10 人回复

发表于 2010-4-21 12:07:12 | 显示全部楼层 |阅读模式

iis7
有高手成功了的没有

回答|共 10 个

ninantc

发表于 2010-4-21 13:14:49 | 显示全部楼层

是urlrewrite,打错了
就是重写,伪静态

add.c

发表于 2010-4-21 13:16:04 | 显示全部楼层

在web.config里写伪静态规则

ninantc

发表于 2010-4-21 13:42:36 | 显示全部楼层

原帖由 add.c 于 2010-4-21 01:16 PM 发表
在web.config里写伪静态规则

我放了web.config后
网站就上不去了
删了就可以上去了
这是我从其它地方复制的webconfig
<!-- Web.Config Configuration File -->

<configuration>
  <system.webServer>
    <rewrite>        
        <rules>        
            <rule name="Index" stopProcessing="true">        
                 <match url="^index.html" />        
                 <action type="Rewrite" url="index.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="Feed" stopProcessing="true">        
                <match url="^feed.xml" />        
                <action type="Rewrite" url="feed.php"  />        
            </rule>        
            <rule name="Category6" stopProcessing="true">        
                <match url="^category-([0-9]+)-b([0-9]+)-min([0-9]+)-max([0-9]+)-attr([^-]*)-([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>
            <rule name="Category5" stopProcessing="true">        
                 <match url="^category-([0-9]+)-b([0-9]+)-min([0-9]+)-max([0-9]+)-attr([^-]*).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="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="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="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="Category1" stopProcessing="true">        
                <match url="^category-([0-9]+).html" />        
                <action type="Rewrite" url="category.php?id={R:1}"  />        
            </rule>        
            <rule name="Goods" stopProcessing="true">        
                <match url="^goods-([0-9]+).html" />        
                <action type="Rewrite" url="goods.php?id={R:1}"  />        
            </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="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="Cat1" stopProcessing="true">        
                <match url="^article_cat-([0-9]+).html" />        
                <action type="Rewrite" url="article_cat.php?id={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="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="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="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="Brand1" stopProcessing="true">        
                <match url="^brand-([0-9]+).html" />        
                <action type="Rewrite" url="brand.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>   
        </rules>        
    </rewrite>
  </system.webServer>
</configuration>

add.c

发表于 2010-4-21 14:06:19 | 显示全部楼层

注意下web.config文件上传的目录问题

ps,php的程序最好还是用linux主机

ninantc

发表于 2010-4-21 15:22:43 | 显示全部楼层

原帖由 add.c 于 2010-4-21 02:06 PM 发表
注意下web.config文件上传的目录问题

ps,php的程序最好还是用linux主机


我ecshop放在根目录
现在web.config也应该放根目录吧?

kklaw 该用户已被删除

发表于 2010-8-6 11:51:42 | 显示全部楼层

刚刚也遇到同样的问题,顶起来

开心私塾

发表于 2010-8-6 15:03:38 | 显示全部楼层

放到根目录试试。

yizhiyong

发表于 2010-10-30 14:05:15 | 显示全部楼层

usbuy.51gpz.com   我的这个,放到根目录  还是不行~~  500错误,所有的站都打不开。。

137950283

发表于 2010-10-30 14:06:30 | 显示全部楼层

ecshop我没伪静态成功过
您需要登录后才可以回帖 登录 | 注册

本版积分规则