分享

写回答

发帖

[提问] ECSHOP 伪静态 设置问题

GoDaddy GoDaddy 2855 人阅读 | 17 人回复

发表于 2010-4-28 08:47:49 | 显示全部楼层 |阅读模式

我的网站是放在子目录的 然后绑定域名
这个空间的主域名是 www.n97n97.com  
我的网站是在 taotxu 这个目录
现在访问 www.n97n97.com/taotxu  是伪静态可以打开
直接访问  www.taotxu.com 伪静态页面就打不开了  



下面是.htaccess 代码 ECSHOP官方的。
<FilesMatch "\.(bak|inc|lib|sh|tpl|lbi|dwt)$">
    order deny,allow
    deny from all
</FilesMatch>

RewriteEngine On
#RewriteBase /

# direct one-word access
RewriteRule ^index\.html$    index\.php [L]
RewriteRule ^category$      index\.php [L]

# access any object by its numeric identifier
RewriteRule ^feed-c([0-9]+)\.xml$       feed\.php\?cat=$1 [L]
RewriteRule ^feed-b([0-9]+)\.xml$       feed\.php\?brand=$1 [L]
RewriteRule ^feed-type([^-]+)\.xml$       feed\.php\?type=$1 [L]
RewriteRule ^feed\.xml$                 feed\.php [L]

RewriteRule ^category-([0-9]+)-b([0-9]+)-min([0-9]+)-max([0-9]+)-attr([^-]*)-([0-9]+)-(.+)-([a-zA-Z]+)(.*)\.html$  category\.php\?id=$1&brand=$2&price_min=$3&price_max=$4&filter_attr=$5&page=$6&sort=$7&order=$8 [QSA,L]
RewriteRule ^category-([0-9]+)-b([0-9]+)-min([0-9]+)-max([0-9]+)-attr([^-]*)(.*)\.html$                            category\.php\?id=$1&brand=$2&price_min=$3&price_max=$4&filter_attr=$5 [QSA,L]
RewriteRule ^category-([0-9]+)-b([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+)(.*)\.html$                                      category\.php\?id=$1&brand=$2&page=$3&sort=$4&order=$5 [QSA,L]
RewriteRule ^category-([0-9]+)-b([0-9]+)-([0-9]+)(.*)\.html$                                                       category\.php\?id=$1&brand=$2&page=$3  [QSA,L]
RewriteRule ^category-([0-9]+)-b([0-9]+)(.*)\.html$                                                                category\.php\?id=$1&brand=$2  [QSA,L]
RewriteRule ^category-([0-9]+)(.*)\.html$                                                                          category\.php\?id=$1  [QSA,L]

RewriteRule ^goods-([0-9]+)(.*)\.html$  goods\.php\?id=$1 [QSA,L]

RewriteRule ^article_cat-([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+)(.*)\.html$  article_cat\.php\?id=$1&page=$2&sort=$3&order=$4  [QSA,L]
RewriteRule ^article_cat-([0-9]+)-([0-9]+)(.*)\.html$                   article_cat\.php\?id=$1&page=$2   [QSA,L]
RewriteRule ^article_cat-([0-9]+)(.*)\.html$                            article_cat\.php\?id=$1   [QSA,L]

RewriteRule ^article-([0-9]+)(.*)\.html$                                article\.php\?id=$1   [QSA,L]

RewriteRule ^brand-([0-9]+)-c([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+)\.html   brand\.php\?id=$1&cat=$2&page=$3&sort=$4&order=$5 [QSA,L]
RewriteRule ^brand-([0-9]+)-c([0-9]+)-([0-9]+)(.*)\.html                brand\.php\?id=$1&cat=$2&page=$3 [QSA,L]
RewriteRule ^brand-([0-9]+)-c([0-9]+)(.*)\.html                         brand\.php\?id=$1&cat=$2 [QSA,L]
RewriteRule ^brand-([0-9]+)(.*)\.html                                   brand\.php\?id=$1 [QSA,L]

RewriteRule ^tag-(.*)\.html                                             search\.php\?keywords=$1 [QSA,L]
RewriteRule ^snatch-([0-9]+)\.html$                                     snatch\.php\?id=$1 [QSA,L]
RewriteRule ^group_buy-([0-9]+)\.html$                                  group_buy\.php\?act=view&id=$1 [QSA,L]
RewriteRule ^auction-([0-9]+)\.html$                                    auction\.php\?act=view&id=$1 [QSA,L]

RewriteRule ^exchange-id([0-9]+)(.*)\.html$                             exchange\.php\?id=$1&act=view [QSA,L]
RewriteRule ^exchange-([0-9]+)-min([0-9]+)-max([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+)(.*)\.html$ exchange\.php\?cat_id=$1&integral_min=$2&integral_max=$3&page=$4&sort=$5&order=$6 [QSA,L]
RewriteRule ^exchange-([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+)(.*)\.html$                         exchange\.php\?cat_id=$1&page=$2&sort=$3&order=$4 [QSA,L]
RewriteRule ^exchange-([0-9]+)-([0-9]+)(.*)\.html$                                          exchange\.php\?cat_id=$1&page=$2  [QSA,L]
RewriteRule ^exchange-([0-9]+)(.*)\.html$                                                   exchange\.php\?cat_id=$1  [QSA,L]

回答|共 17 个

www.cpanel.my

发表于 2010-4-28 09:03:15 | 显示全部楼层

.Htaccess放在taotu文件夹

wenshuai008

发表于 2010-4-28 09:07:53 | 显示全部楼层

已经放在 TAOTXU 文件夹里面了

add.c

发表于 2010-4-28 09:12:42 | 显示全部楼层

这个要修改#RewriteBase /
/替换为RewriteBase /taotu

wenshuai008

发表于 2010-4-28 09:24:42 | 显示全部楼层

是不是修改了 不会立刻生效?  我已经改了  现在还不行
RAKSmart

wenshuai008

发表于 2010-4-28 09:35:44 | 显示全部楼层

回复 4# 的帖子

帮帮我大哥

wenshuai008

发表于 2010-4-28 10:24:05 | 显示全部楼层

还是不行 www.taotxu.com

add.c

发表于 2010-4-28 10:29:40 | 显示全部楼层

你现在的代码是什么样的, 贴出来看看

hgh188

发表于 2010-4-28 11:05:59 | 显示全部楼层

  1. <FilesMatch "\.(bak|inc|lib|sh|tpl|lbi|dwt)$">
  2.     order deny,allow
  3.     deny from all
  4. </FilesMatch>

  5. RewriteEngine On
  6. RewriteBase /

  7. # direct one-word access
  8. RewriteRule ^index\.html$    index\.php [L]
  9. RewriteRule ^category$      index\.php [L]

  10. # access any object by its numeric identifier
  11. RewriteRule ^feed-c([0-9]+)\.xml$       feed\.php\?cat=$1 [L]
  12. RewriteRule ^feed-b([0-9]+)\.xml$       feed\.php\?brand=$1 [L]
  13. RewriteRule ^feed-type([^-]+)\.xml$       feed\.php\?type=$1 [L]
  14. RewriteRule ^feed\.xml$                 feed\.php [L]

  15. RewriteRule ^category-([0-9]+)-b([0-9]+)-min([0-9]+)-max([0-9]+)-attr([^-]*)-([0-9]+)-(.+)-([a-zA-Z]+)(.*)\.html$  category\.php\?id=$1&brand=$2&price_min=$3&price_max=$4&filter_attr=$5&page=$6&sort=$7&order=$8 [QSA,L]
  16. RewriteRule ^category-([0-9]+)-b([0-9]+)-min([0-9]+)-max([0-9]+)-attr([^-]*)(.*)\.html$                            category\.php\?id=$1&brand=$2&price_min=$3&price_max=$4&filter_attr=$5 [QSA,L]
  17. RewriteRule ^category-([0-9]+)-b([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+)(.*)\.html$                                      category\.php\?id=$1&brand=$2&page=$3&sort=$4&order=$5 [QSA,L]
  18. RewriteRule ^category-([0-9]+)-b([0-9]+)-([0-9]+)(.*)\.html$                                                       category\.php\?id=$1&brand=$2&page=$3  [QSA,L]
  19. RewriteRule ^category-([0-9]+)-b([0-9]+)(.*)\.html$                                                                category\.php\?id=$1&brand=$2  [QSA,L]
  20. RewriteRule ^category-([0-9]+)(.*)\.html$                                                                          category\.php\?id=$1  [QSA,L]

  21. RewriteRule ^goods-([0-9]+)(.*)\.html$  goods\.php\?id=$1 [QSA,L]

  22. RewriteRule ^article_cat-([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+)(.*)\.html$  article_cat\.php\?id=$1&page=$2&sort=$3&order=$4  [QSA,L]
  23. RewriteRule ^article_cat-([0-9]+)-([0-9]+)(.*)\.html$                   article_cat\.php\?id=$1&page=$2   [QSA,L]
  24. RewriteRule ^article_cat-([0-9]+)(.*)\.html$                            article_cat\.php\?id=$1   [QSA,L]

  25. RewriteRule ^article-([0-9]+)(.*)\.html$                                article\.php\?id=$1   [QSA,L]

  26. RewriteRule ^brand-([0-9]+)-c([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+)\.html   brand\.php\?id=$1&cat=$2&page=$3&sort=$4&order=$5 [QSA,L]
  27. RewriteRule ^brand-([0-9]+)-c([0-9]+)-([0-9]+)(.*)\.html                brand\.php\?id=$1&cat=$2&page=$3 [QSA,L]
  28. RewriteRule ^brand-([0-9]+)-c([0-9]+)(.*)\.html                         brand\.php\?id=$1&cat=$2 [QSA,L]
  29. RewriteRule ^brand-([0-9]+)(.*)\.html                                   brand\.php\?id=$1 [QSA,L]

  30. RewriteRule ^tag-(.*)\.html                                             search\.php\?keywords=$1 [QSA,L]
  31. RewriteRule ^snatch-([0-9]+)\.html$                                     snatch\.php\?id=$1 [QSA,L]
  32. RewriteRule ^group_buy-([0-9]+)\.html$                                  group_buy\.php\?act=view&id=$1 [QSA,L]
  33. RewriteRule ^auction-([0-9]+)\.html$                                    auction\.php\?act=view&id=$1 [QSA,L]

  34. RewriteRule ^exchange-id([0-9]+)(.*)\.html$                             exchange\.php\?id=$1&act=view [QSA,L]
  35. RewriteRule ^exchange-([0-9]+)-min([0-9]+)-max([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+)(.*)\.html$ exchange\.php\?cat_id=$1&integral_min=$2&integral_max=$3&page=$4&sort=$5&order=$6 [QSA,L]
  36. RewriteRule ^exchange-([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+)(.*)\.html$                         exchange\.php\?cat_id=$1&page=$2&sort=$3&order=$4 [QSA,L]
  37. RewriteRule ^exchange-([0-9]+)-([0-9]+)(.*)\.html$                                          exchange\.php\?cat_id=$1&page=$2  [QSA,L]
  38. RewriteRule ^exchange-([0-9]+)(.*)\.html$                                                   exchange\.php\?cat_id=$1  [QSA,L]
复制代码

add.c

发表于 2010-4-28 11:18:54 | 显示全部楼层

RewriteBase /
不是让你改为RewriteBase /taotxu吗
您需要登录后才可以回帖 登录 | 注册

本版积分规则