Why Magento custom module frontend url is forced to https.?

Posted: January 11, 2013 in Magento, Version 1.3.*, Version 1.4.*, Version 1.6.*
Tags: ,

Hello,

Today i’ll show you how to resolve issue of custom module frontend url is forced to https. instead of http. If you have used module creator to create module. Than you will definetly find below code in config.xml


<admin>
       <routers>
         <[ModuleName]>
            <use>admin</use>
            <args>
                <module>[NameSpace_ModuleName]</module>
                <frontName>[frontName]</frontName>
            </args>
        </[ModuleName]>
    </routers>
</admin>

To resolve issue of redirection to https instead of http, you need to comment above code from module config.xml file Path: app/code/(codepool)/(NameSpace)/(ModuleName)/etc/config.xml OR you can add different “frontName” for <admin> and <frontend> routers. Eg.:


<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>

As per above code admin url will be http://yourdomain.com/index.php/frontName/adminhtml_moduleName/ and  frontend url will be like: http://yourdomain.com/index.php/frontName1

I hope above content is useful to you. Thanks for visiting my blog. Feel free to ask questions, if you have doubt.

Thanks,
Bijal Bhavsar 🙂

Advertisements
Comments
  1. Ben Mickie says:

    This issue of having magento custom module frontend url forced to https instead of http is really annoying. Your guide on how to prevent it is terrific!

  2. dylan says:

    it’s usefull,thanks!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s