自定义模块的问题:URL将http重定向到https
题
我面临着我创建正常工作的模块的问题。但是,当我开始使用SSL IE HTTP到HTTPS进行结帐过程时。我创建的前端模块开始强迫使用HTTPS。
解决方案
检查如何解析自定义模块前端URL的问题被迫使用HTTPS。而不是http。如果您使用模块创建器来创建模块。比您将在config.xml中明确找到以下代码
<admin>
<routers>
<[ModuleName]>
<use>admin</use>
<args>
<module>[NameSpace_ModuleName]</module>
<frontName>[frontName]</frontName>
</args>
</[ModuleName]>
</routers>
</admin>
要解决重定向到https而不是http的问题,您需要从模块config.xml文件路径:app/code/(codepool)/(namespace)/(modulename)/(modulename)/etc/config.xml中评论上述代码上方。不同的“前名”和路由器。例如。:
<admin>
<routers>
<[ModuleName]>
<use>admin</use>
<args>
<module>[NameSpace_ModuleName]</module>
<frontName>[frontName]</frontName>
</args>
</[ModuleName]>
</routers>
</admin>
<frontend>
<routers>
<[ModuleName]>
<use>standard</use>
<args>
<module>[NameSpace_ModuleName]</module>
<frontName>[frontName1]</frontName>
</args>
</[ModuleName]>
</routers>
</frontend>
根据上述代码,管理员将是 http://yourdomain.com/index.php/frontname/adminhtml_modulename/ 前端URL将就像: http://yourdomain.com/index.php/frontname1
我希望上面的内容对您有用。