代码点火器 +一台主机上的 Opencart -- URI 路由问题
好吧,我搜索了论坛,但找不到任何具体答案。 网站和商店不一样。 Codeigniter 已用于处理所有内容,因此现在我想使用 Opencart 添加商店,而 URI 路由是问题所在。
(事实是,我不是 CI 粉丝,但既然我之前的人使用了它,我别无选择,只能继续,现在我必须沿着 CI 添加一个商店!)
我应该将网站与商店分开,并将每个商店放入主机上的单独文件夹并使用 .htaccess 重写规则来处理与每个 MVC 相关的 URI,或者我可以做一些简单的事情吗?
OK I searched the boards and could not found any specific answer.
the website and the shop aren't the same. Codeigniter has been used for handling everything so now I want to add a shop using Opencart and the URI routing is the problem.
(The truth is Im not a CI fan but since the guy before me used it I have no other choice but to continue and now I have to add a shop along CI!)
Should I separate the website from the shop and put each one into a separate folder on the host and use .htaccess rewrite rules to handle URI related to each MVC or can I do something simple?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您应该能够在 CI“系统”文件夹的同一级别创建一个文件夹,您可以在其中复制所有商店文件。然后,您只需通过domain.com/shop/ 访问商店,
如果您已经拥有从CI url 中删除index.php 的默认.htaccess 文件,我认为您不需要更改任何路由或.htaccess 规则。我在几个网站上这样做,效果很好。
编辑:这是我的完整 .htaccess 文件,该文件可以正常工作的网站
You should be able to create a folder at the same level of your CI "system" folder and in there you can copy all the shop files. You then just access the shop via domain.com/shop/
I don't think you need to change any routing or .htaccess rules if you already have the default .htaccess file in place that removes index.php from the CI urls. I'm doing this on several sites and it works fine.
EDIT: here is my full .htaccess file for a site where this works fine