创建管理网址的Magento是admin.magentostore.com(不是/管理员) [英] Creating an admin url for Magento that is admin.magentostore.com (not /admin)

查看:267
本文介绍了创建管理网址的Magento是admin.magentostore.com(不是/管理员)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我用一些负载均衡的服务器,并有一个要求,其中我的所有管理任务被归结为一个服务器。我们已经确定,要做到这一点的最好办法是管理一个DNS条目。指向我们的主服务器。

I'm using some load balanced servers and have a requirement wherein all of my admin tasks are relegated to one server. We have determined that the best way to do this is a DNS entry for admin. to point to our primary server.

我看到的问题是,所有的自定义管理网址的都还在magentostore.com/admin~~V而我需要admin.magentostore.com。

The problem I am seeing is that all of the custom admin urls are all still magentostore.com/admin whereas I need admin.magentostore.com.

任何意见或有没有人做过类似的事情?

Any ideas or has anyone done something similar?

谢谢!

推荐答案

第一次尝试在开发环境中为摆脱Live网站的问题!

这些可以通过以下步骤来完成,

These can be done by the following steps, :

  1. 您需要定义基础URL仅用于管理存储视图,然后经过输入/管理员的你会被重定向到它的基本URL地址字符串。为此,你需要在管理缺省值基本URL配置选项设置为 http://admin.yourdomain.com 并为每个网站,你需要指定它自己的基URL(例如 http://yourdomain.com )。它可以通过管理界面或config.xml文件来完成。在第二种情况下,你需要所有的记录,从 core_config_data table删除那些在这些路径:网​​络/安全/ BASE_URL 网​​页/不安全/ BASE_URL

  1. You need to define base url only for admin store view, then after typing /admin in the address string you will be redirected to base url of it. For this purpose you need to set base url configuration option in admin for default values to http://admin.yourdomain.com and for each website you need to specify its own base url (for example http://yourdomain.com). It can be done via admin interface or config.xml file. In the second case, you need to remove all the records from core_config_data table those in these paths: web/secure/base_url and web/unsecure/base_url.

<config>
     <default>
         <admin>
             <web>
                 <unsecure> <!-- defining HTTP url options for admin store -->
                     <base_url>http://admin.yourdomain.com/</base_url>
                 </unsecure>
                 <secure> <!-- defining HTTPS url options for admin store -->
                     <base_url>https://admin.yourdomain.com/</base_url>
                 </secure>
             </web>
         </admin>
     </default>
     <websites>
         <website_code1>
             <web>
                 <unsecure> <!-- defining HTTP url options for admin store -->
                     <base_url>http://yourdomain1.com/</base_url>
                 </unsecure>
                 <secure> <!-- defining HTTPS url options for admin store -->
                     <base_url>https://yourdomain1.com/</base_url>
                 </secure>
             </web>
         </website_code1>
         <website_code2>
             <web>
                 <unsecure> <!-- defining HTTP url options for admin store -->
                     <base_url>http://yourdomain1.com/</base_url>
                 </unsecure>
                 <secure> <!-- defining HTTPS url options for admin store -->
                     <base_url>https://yourdomain1.com/</base_url>
                 </secure>
             </web>
         </website_code2>
     </websites>
</config>

  • 有关自动应用的管理存​​储视图,您需要创建的.htaccess规则的Magento,将设置店面code为它的运行来管理,并创建重定向到/管理/请求路径,如果它没有定义的。您需要定义这样的规则,使之成为可能:

  • For automatically applying of admin store view, you need to create .htaccess rule for Magento that will set the store code for running of it to admin and create redirect to /admin/ request path if it is not defined. You need to define rules like these to make it possible:

    SetEnvIf Host ^admin\.yourdomain\.com$ MAGE_RUN_CODE=admin
    RewriteEngine On
    RewriteCond %{HTTP:HOST} ^admin\.yourdomain\.com$
    RewriteCond %{REQUEST_URI} !/admin/
    RewriteRule .* %{REQUEST_URI}index.php/admin/ [R=302,L]
    

  • 这篇关于创建管理网址的Magento是admin.magentostore.com(不是/管理员)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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