为什么我输入网页首页地址 跳转的不是首页?
2016-07-07 15:36 来源:www.chinab4c.com 作者:ecshop专家
/** * 获得最新的团购活动 * * @accessprivate * @returnarray */ function index_get_group_buy() { $time = gmtime(); $limit = get_library_number('group_buy', 'index'); $group_buy_list = array(); if ($limit > 0) { $sql = 'SELECT gb.act_id AS group_buy_id, gb.goods_id, gb.ext_info, gb.goods_name, g.goods_thumb, g.goods_img ' . 'FROM ' . $GLOBALS['ecs']->table('goods_activity') . ' AS gb, ' . $GLOBALS['ecs']->table('goods') . ' AS g ' . "WHERE gb.act_type = '" . GAT_GROUP_BUY . "' " . "AND g.goods_id = gb.goods_id " . "AND gb.start_time <= '" . $time . "' " . "AND gb.end_time >= '" . $time . "' " . "AND g.is_delete = 0 " . "ORDER BY gb.act_id DESC " . "LIMIT $limit" ; $res = $GLOBALS['db']->query($sql); while ($row = $GLOBALS['db']->fetchRow($res)) { /* 如果缩略图为空,使用默认图片 */ $row['goods_img'] = get_image_path($row['goods_id'], $row['goods_img']); $row['thumb'] = get_image_path($row['goods_id'], $row['goods_thumb'], true); /* 根据价格阶梯,计算最低价 */ $ext_info = unserialize($row['ext_info']); $price_ladder = $ext_info['price_ladder']; if (!is_array($price_ladder) || empty($price_ladder)) { $row['last_price'] = price_format(0); } else { foreach ($price_ladder AS $amount_price) { $price_ladder[$amount_price['amount']] = $amount_price['price']; } } ksort($price_ladder); $row['last_price'] = price_format(end($price_ladder)); $row['url'] = build_uri('group_buy', array('gbid' => $row['group_buy_id'])); $row['short_name']= $GLOBALS['_CFG']['goods_name_length'] > 0 ? sub_str($row['goods_name'], $GLOBALS['_CFG']['goods_name_length']) : $row['goods_name']; $row['short_style_name']= add_style($row['short_name'],''); $group_buy_list[] = $row; } } return $group_buy_list; } /** * 取得拍卖活动列表 * @returnarray */ function index_get_auction() { $now = gmtime(); $limit = get_library_number('auction', 'index'); $sql = "SELECT a.act_id, a.goods_id, a.goods_name, a.ext_info, g.goods_thumb ". "FROM " . $GLOBALS['ecs']->table('goods_activity') . " AS a," . $GLOBALS['ecs']->table('goods') . " AS g" . " WHERE a.goods_id = g.goods_id" . " AND a.act_type = '" . GAT_AUCTION . "'" . " AND a.is_finished = 0" . " AND a.start_time <= '$now'" . " AND a.end_time >= '$now'" . " AND g.is_delete = 0" . " ORDER BY a.start_time DESC" . " LIMIT $limit"; $res = $GLOBALS['db']->query($sql); $list = array(); while ($row = $GLOBALS['db']->fetchRow($res)) { $ext_info = unserialize($row['ext_info']); $arr = array_merge($row, $ext_info); $arr['formated_start_price'] = price_format($arr['start_price']); $arr['formated_end_price'] = price_format($arr['end_price']); $arr['thumb'] = get_image_path($row['goods_id'], $row['goods_thumb'], true); $arr['url'] = build_uri('auction', array('auid' => $arr['act_id'])); $arr['short_name']= $GLOBALS['_CFG']['goods_name_length'] > 0 ? sub_str($arr['goods_name'], $GLOBALS['_CFG']['goods_name_length']) : $arr['goods_name']; $arr['short_style_name']= add_style($arr['short_name'],''); $list[] = $arr; } return $list; } /** * 获得所有的友情链接 * * @accessprivate * @returnarray */ function index_get_links() { $sql = 'SELECT link_logo, link_name, link_url FROM ' . $GLOBALS['ecs']->table('friend_link') . ' ORDER BY show_order'; $res = $GLOBALS['db']->getAll($sql); $links['img'] = $links['txt'] = array(); foreach ($res AS $row) { if (!empty($row['link_logo'])) { $links['img'][] = array('name' => $row['link_name'], 'url'=> $row['link_url'], 'logo' => $row['link_logo']); } else { $links['txt'][] = array('name' => $row['link_name'], 'url'=> $row['link_url']); } } return $links; } ?> |
回答:
这是我的index.php输入www.fansyy.cn跳转分类瑜伽为什么?那里错了? |
是不是你空间 首页名字改了 |
没有更改过 |
跳转的页面 http://www.fansyy.cn/category.php?id=1 |
贴下你的重写规则看下,还有你是否是使用官方的重写规则 |
htaccess.txt 文件我没有修改过 是空间商搞的 |
另外我开启伪静态 我首页还是index.php开启应该是inde.html |
上面的那个是你空间上htaccess.txt的全部内容? |
是的 我复制下来了 |
[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[code][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[DISCUZ_CODE_1]nbsp; /ecshop/category.php?id=$1&brand=$2&page=$3 RewriteRule ^(.*)/category-([0-9]+)-b([0-9]+)-([0-9]+)(.*)\.html[DISCUZ_CODE_1]nbsp;$1/category\.php\? id=$2&brand=$3&page=$4 #RewriteRule /ecshop/category-([0-9]+)-b([0-9]+)(.*)\.html[DISCUZ_CODE_1]nbsp;/ecshop/category.php? id=$1&brand=$2 RewriteRule ^(.*)/category-([0-9]+)-b([0-9]+)(.*)\.html[DISCUZ_CODE_1]nbsp;$1/category\.php\? id=$2&brand=$3 #RewriteRule /ecshop/category-([0-9]+)(.*)\.html[DISCUZ_CODE_1]nbsp; /ecshop/category.php?id=$1 RewriteRule ^(.*)/category-([0-9]+)(.*)\.html[DISCUZ_CODE_1]nbsp; $1/category\.php\?id=$2 #RewriteRule /ecshop/goods-([0-9]+)(.*)\.html[DISCUZ_CODE_1]nbsp; /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[DISCUZ_CODE_1]nbsp;/ecshop/article_cat.php? id=$1&page=$2 RewriteRule ^(.*)/article_cat-([0-9]+)-([0-9]+)(.*)\.html[DISCUZ_CODE_1]nbsp;$1/article_cat\.php\? id=$2&page=$3 #RewriteRule /ecshop/article_cat-([0-9]+)(.*)\.html[DISCUZ_CODE_1]nbsp;/ecshop/article_cat.php?id=$1 RewriteRule ^(.*)/article_cat-([0-9]+)(.*)\.html[DISCUZ_CODE_1]nbsp;$1/article_cat\.php\?id=$2 #RewriteRule /ecshop/article-([0-9]+)(.*)\.html[DISCUZ_CODE_1]nbsp; /ecshop/article.php?id=$1 RewriteRule ^(.*)/article-([0-9]+)(.*)\.html[DISCUZ_CODE_1]nbsp; $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/ecshop/search.php?keywords=$1 RewriteRule ^(.*)/tag-(.*)\.html$1/search\.php\?keywords=$2 nbsp;/ecshop/category.php?id=$1&brand=$2&page=$3 RewriteRule ^(.*)/category-([0-9]+)-b([0-9]+)-([0-9]+)(.*)\.html[DISCUZ_CODE_1]nbsp;$1/category\.php\? id=$2&brand=$3&page=$4 #RewriteRule /ecshop/category-([0-9]+)-b([0-9]+)(.*)\.html[DISCUZ_CODE_1]nbsp;/ecshop/category.php? id=$1&brand=$2 RewriteRule ^(.*)/category-([0-9]+)-b([0-9]+)(.*)\.html[DISCUZ_CODE_1]nbsp;$1/category\.php\? id=$2&brand=$3 #RewriteRule /ecshop/category-([0-9]+)(.*)\.html[DISCUZ_CODE_1]nbsp; /ecshop/category.php?id=$1 RewriteRule ^(.*)/category-([0-9]+)(.*)\.html[DISCUZ_CODE_1]nbsp; $1/category\.php\?id=$2 #RewriteRule /ecshop/goods-([0-9]+)(.*)\.html[DISCUZ_CODE_1]nbsp; /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[DISCUZ_CODE_1]nbsp;/ecshop/article_cat.php? id=$1&page=$2 RewriteRule ^(.*)/article_cat-([0-9]+)-([0-9]+)(.*)\.html[DISCUZ_CODE_1]nbsp;$1/article_cat\.php\? id=$2&page=$3 #RewriteRule /ecshop/article_cat-([0-9]+)(.*)\.html[DISCUZ_CODE_1]nbsp;/ecshop/article_cat.php?id=$1 RewriteRule ^(.*)/article_cat-([0-9]+)(.*)\.html[DISCUZ_CODE_1]nbsp;$1/article_cat\.php\?id=$2 #RewriteRule /ecshop/article-([0-9]+)(.*)\.html[DISCUZ_CODE_1]nbsp; /ecshop/article.php?id=$1 RewriteRule ^(.*)/article-([0-9]+)(.*)\.html[DISCUZ_CODE_1]nbsp; $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/ecshop/search.php?keywords=$1 RewriteRule ^(.*)/tag-(.*)\.html$1/search\.php\?keywords=$2 |
这是httpd.ini内容 |
httpd.ini修改为官方规则 问题依然存在 |
最近更新
常用插件
- ecshop商品列表中品牌批量
ecshop商品列表中品牌批量转移插件.这个插件听起来非常希奇。但是我们...
- ecshop导出待发货订单exce
ecshop导出待发货订单excel格式,这个东西是十分重要的,我们在倒出ec...
- ecshop后台订单商品列表查
ecshop后台订单商品列表查询插件,可以通过名称。就把产品显示检索出...
- ecshop2.7.2迷你购物车插件
ecshop2.7.2迷你购物车插件,这个插件主要是针对修改ecshop购买功能,为了...
- ecshop评论功能改进插件
ecshop评论功能改进插件,这个插件是改进了现有的ecshop评论功能的一些...
ecshop热门问答
ecshop热门资料
ecshop显示数量问题
ecshoparr
ecshop求援
ecshop老师
ecshop列表
ecshop尝试
ecshop邮箱登录
ecshop建站程序
ecshop情人节
ecshop网店系统
ecshop显示分析
ecshop图片问题
ecshopwap客户端
ecshop302
ecshoprestriction
ecshopmoneybookers
ecshop但是
ecshop推广管理
ecshop顺开导航
ecshop仪器仪表
ecshop名字
ecshop折腾
ecshopgoddady
ecshop电子信箱
ecshop配置地区
ecshop使用方法
ecshop備份
ecshop信息
ecshopECMALL防SQL注入
ecshop访问