How can I create custom SEO-friendly URLs in OpenCart?

前端 未结 8 1662
天命终不由人
天命终不由人 2020-11-30 22:29

How can you customize system URLs in OpenCart? For example, I would like http://example.com/index.php?route=checkout/cart to be displayed as http://example.com/cart

8条回答
  •  执念已碎
    2020-11-30 23:21

    vQmod xml file

    
    Seo All Alias
    1.0
    2.1.7
    noname
     
        
            request->get['route'] = 'information/information';
            ]]>
            db->query("SELECT * FROM " . DB_PREFIX . "url_alias WHERE keyword = '" . $this->db->escape($this->request->get['_route_']) . "'");
                if ($query->num_rows) {
                    $this->request->get['route'] = $query->row['query'];
                }
            }
            ]]>
        
    
        
            
            db->query("SELECT * FROM " . DB_PREFIX . "url_alias WHERE `query` = '" . $this->db->escape($data['route']) . "'");
    
                        if ($query->num_rows) {
                            $url .= '/' . $query->row['keyword'];
                            unset($data[$key]);
                        }
                    }
            ]]>
        
    
    
    

提交回复
热议问题