I've configured Magento 2 website as maintenance mode from .maintenance.flag
it's working, at the same time I have configured released IPs from .maintenance.ip
file.
For multiple IPs not working while for single IP it's working fine.
How can I configure to release selected multiple IPs?
For this I have written I have created.
1) .maintenance.flag
file from var
.
2) .maintenance.ip
file from var
and written code for release single IP
192.168.0.52
For single I have written above it's working.
192.168.0.52,192.168.0.53
For multiple, I have written above it's not working.
Can you please let me know how can I write to release multiple IP's and also how can I configure to redirect particular page while maintenance Mode?
Best Answer
For activating maintenance mode with IP addresses execute below command in
CLI
the above command will automatically create a
.maintenance.flag
and.maintenance.ip
file underroot/var
folder.and
.maintenance.ip
the file contains the above two IP addresses separated by a comma.For more Information, you can find from devdocs.
The above information is for maintenance mode.
To redirect a custom page while maintenance mode writes below code in
root/index.php
.If anyone has better approach please update this answer.