I use several load-balanced servers and have the requirement that all of my administrative tasks be allocated to a single server. We have determined that the best way to do this is with a DNS record for the administrator. to point to our main server.
The problem I see is that all user urls are still magentostore.com/admin, while I need admin.magentostore.com.
Any ideas or did anyone do something similar?
Thank!
, !
:
url admin, /admin URL-. url admin http://admin.yourdomain.com, - url (, http://yourdomain.com). config.xml. core_config_data, : web/secure/base_url web/unsecure/base_url.
http://admin.yourdomain.com
http://yourdomain.com
core_config_data
web/secure/base_url
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, /admin/request, . , :
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]
.htaccess, admin.magentostore.com index.php/admin. Apache rewrite, , . Magento , .htaccess .
admin.magentostore.com
index.php/admin
, JD
System > Configuration > Admin > Admin Base URL. http://admin.magentostore.com/. MAGE_RUN_CODE, , .
http://admin.magentostore.com/
MAGE_RUN_CODE
( ) , URL-. , , admin, , , , ...
Source: https://habr.com/ru/post/1772998/More articles:JQuery element coordinates - jqueryParameter URL must be non-null - actionscriptProlog Question - How to create sublists of a certain length - prologHow to create a dynamic menu structure using Django? - djangoDifference between JSON sequence - jsonPassing an instance to a generic method in VB.NET - methodshttps://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1773000/sql-2008-express-slow-on-first-request-goes-to-sleep&usg=ALkJrhgbXckVn_T_ECS566XTnSgoyOtoiwсинхронизированные методы могут выполняться одновременно? - javaBuilt-in git commit hash in source file - gitSelf-signed Certificate Performance in WCF Scripts - performanceAll Articles