标题重定向在htaccess中重定向url或类似的东西

时间:2016-06-16 11:20:48

标签: php codeigniter

我想重定向这个请指导我

形式

  

http://example.com/babycare/general_help/category.php?id=10

http://example.com/babycare/article/category/10

id应该是动态变化的,即id可以是10,12,12或23等

  

块引用

2 个答案:

答案 0 :(得分:0)

尝试使用.htaccess:

$start = Carbon::createFromDate(2015, 10, 1);
$result = Pms::raw(function ($collection) use($start){
        return $collection->aggregate(array(
            array(
                '$match' => array(
                    'EventTS' => array(
                        '$gte' => $start
                    )
                )
            ), 
            array(
                '$unwind' => array(
                    'path' => '$MainsPower',
                    'includeArrayIndex' => "arrayIndex",
                    'preserveNullAndEmptyArrays' => true
                )
            ),                           
            array(
                '$project' => array(
                    'MainsPower' => 1,
                    'timestamp' => array(
                        '$add' => array(
                            '$EventTS',
                            array( '$multiply' => array( 60000, '$arrayIndex' ) )
                        )
                    )
                )
            )
        ));
    })->toArray();

答案 1 :(得分:0)

尝试这个,你需要根据你的类别改变它的一部分

  RewriteEngine On
RewriteRule ^category/(.+)/(.+)$ category.php?$1=$2 [NC,L]