我正在使用 Magento 构建一个虚拟商店,并且我正在使用带有“M”计划的 HostGator 托管,它支持多个站点,问题是 Magento 在根目录中,我在文件夹中有另一个站点/example.com.br
,但是当我尝试通过浏览器访问此站点时:
http://example.com.br
我被重定向到 Magento 网站:
http://magentosite.com.br/maintenance.html
根文件夹(magento 的 htaccess)上的 htaccess 正在重定向到 magento 维护页面http://magentosite.com.br/maintenance.html
,我只需要保留 Magento 进行维护,而不是某些文件夹中的站点,如文件夹/example.com.br
等/example2.com.br
...
这是我在 Magento 中使用的维护代码(在 Root 中):
RewriteEngine On
RewriteBase /
# allow my ip to access magento store
RewriteCond %{REMOTE_ADDR} !^177\.18\.228\.58
RewriteCond %{REQUEST_URI} !^/maintenance\.html$
RewriteRule ^(.*)$ https://magentosite.com.br/maintenance.html [R=307,L]
我尝试了这个解决方案https://stackoverflow.com/a/6528448/2761794但对我不起作用......