使用 OpenCart 的路由器类清理 URL [英] Clean URL's using OpenCart's router class

查看:86
本文介绍了使用 OpenCart 的路由器类清理 URL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何使用 OpenCart 内置的 Router 类在 OpenCart 中编写干净的 URL?这是我的 .htaccess 文件:

<前>重写引擎开启重写规则 ^(system) - [F,L]RewriteCond %{REQUEST_FILENAME} !-fRewriteCond %{REQUEST_FILENAME} !-d重写规则 .* index.php/$0 [PT,L]

解决方案

工作很辛苦修改3个以上文件

catalog\controller\common\seo_url.php目录\模型\工具\seo_url.php

将此行添加到您的文件中以进行修改

$this->load->model('tool/seo_url')并使用$this->model_tool_seo_url->rewrite() 重写.

很难说清楚,以上只是大概的

How do you write clean URL's in OpenCart using their built in Router class? Here is my .htaccess file:

RewriteEngine On
RewriteRule ^(system) - [F,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* index.php/$0 [PT,L]

解决方案

The work is very hard To modify more than 3 files

catalog\controller\common\seo_url.php
catalog\model\tool\seo_url.php

Add this line to your file to modify

$this->load->model('tool/seo_url') and used $this->model_tool_seo_url->rewrite() to rewrite.

Hard to say clearly,the above are only approximate

这篇关于使用 OpenCart 的路由器类清理 URL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆