一些管理模块重定向到前端 [英] Some admin modules redirect to frontend

查看:81
本文介绍了一些管理模块重定向到前端的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Magento又开了一家商店.在创建此商店之前,所有模块都可以正常工作.但是创建此存储后,某些模块将重定向到前端.

I have created one more store in Magento. Before creation of this store, all modules worked fine. But after created this store, some of the modules will redirect to frontend.

我对此概念进行了谷歌搜索,并获得了该线程

I have googled regarding this concept and got this thread https://magento.stackexchange.com/questions/4623/custom-admin-url-now-some-admin-modules-redirect-to-frontend

我已遵循该主题的答案.但这对我不起作用.大多数线程都具有与该线程相同的答案.

I have followed this thread's answer. But it doesn't work for me. Most of the threads have the same answer like this thread.

请救救我.

谢谢

编辑

<?xml version="1.0"?>
 <config>
  <modules>
    <Chilly_Imageslide>
        <version>0.1.0</version>
    </Chilly_Imageslide>
</modules>
<frontend>
    <routers>
        <imageslide>
            <use>standard</use>
            <args>
                <module>Chilly_Imageslide</module>
                <frontName>imageslide</frontName>
            </args>
        </imageslide>
    </routers>
    <layout>
        <updates>
            <imageslide>
                <file>imageslide.xml</file>
            </imageslide>
        </updates>
    </layout>
</frontend>
<admin>
    <routers>
     <adminhtml>
        <use>admin</use>
        <args>
            <modules>
                <imageslide before="Mage_Adminhtml">Chilly_Imageslide_Adminhtml</imageslide>
            </modules>
        </args>
    </adminhtml>
        <!--<imageslide>
            <use>admin</use>
            <args>
                <module>Chilly_Imageslide</module>
                <frontName>imageslide</frontName>
            </args>
        </imageslide>-->
    </routers>
</admin>
<adminhtml>
   <menu>
        <imageslide module="imageslide">
            <title>Imageslide</title>
            <sort_order>71</sort_order>               
            <children>
                <items module="imageslide">
                    <title>Manage Items</title>
                    <sort_order>0</sort_order>
                    <action>imageslide/adminhtml_imageslide</action>
                </items>
            </children>
        </imageslide>
    </menu>
    <acl>
        <resources>
            <all>
                <title>Allow Everything</title>
            </all>
            <admin>
                <children>
                    <imageslide>
                        <title>ImageSlide Module</title>
                        <sort_order>200</sort_order>
                    </imageslide>
                </children>
            </admin>
        </resources>   
    </acl>
    <layout>
        <updates>
            <imageslide>
                <file>imageslide.xml</file>
            </imageslide>
        </updates>
    </layout>
</adminhtml>   
<global>
    <models>
        <imageslide>
            <class>Chilly_Imageslide_Model</class>
            <resourceModel>imageslide_mysql4</resourceModel>
        </imageslide>
        <imageslide_mysql4>
            <class>Chilly_Imageslide_Model_Mysql4</class>
            <entities>
                <imageslide>
                    <table>imageslide</table>
                </imageslide>
            </entities>
        </imageslide_mysql4>
    </models>
    <resources>
        <imageslide_setup>
            <setup>
                <module>Chilly_Imageslide</module>
            </setup>
            <connection>
                <use>core_setup</use>
            </connection>
        </imageslide_setup>
        <imageslide_write>
            <connection>
                <use>core_write</use>
            </connection>


        </imageslide_write>
        <imageslide_read>
            <connection>
                <use>core_read</use>
            </connection>
        </imageslide_read>
    </resources>
    <blocks>
        <imageslide>
            <class>Chilly_Imageslide_Block</class>
        </imageslide>
    </blocks>
    <helpers>
        <imageslide>
            <class>Chilly_Imageslide_Helper</class>
        </imageslide>
    </helpers>
</global>
</config>

推荐答案

我找到了解决方案.我们已经设定了一个条件,例如根据国家/地区明智地重定向商店!英国人的主要商店.但是我们在印度!因此,对于管理员访问,我们具有类似

I got a solution. We have set a condition like to redirect stores based on country wise! Main store for UK folks. But we are in India! So for admin access we have write condition like

 RewriteCond %{ENV:GEOIP_COUNTRY_CODE} IN$    
 RewriteCond %{REQUEST_URI} !admin [NC]
 RewriteRule ^ http://www.domain.in [R=301,L]

这意味着,当尝试访问印度的主要商店并且该URL不得包含关键字"admin"时,它将重定向到给定的域.对于尝试访问管理面板的人

It means, when try to access main store in India and that url must not have the keyword "admin", it will redirect to given domain.For try to access admin panel

但是在我的自定义模块admin表单中,URL没有单词"admin".因此只有它会重定向到另一个商店的前端.之后,我对.htaccess重定向代码进行了一些修改,现在可以正常使用了!

But in my custom module admin form url doesn't have the word "admin". so only it will redirect to frontend of another store. After that i have changed some modifications on that .htaccess redirection code, Now its working fine!

感谢所有审核我的问题的人!

Thank you to all who review my question!

有关更多详细信息,请查看此帖子基于htaccess的基于国家/地区的htaccess的Magento重定向

EDIT : For further details please review this post Magento redirection with htaccess based on country wise

这篇关于一些管理模块重定向到前端的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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