Is their a way to put website frontend only in Maintenance mode, and allow all users to access admin. (i am working on PHP).
I believe that can be done via .htaccess, but not getting how ?
Any help ?
I tried :
RewriteEngine On
RewriteRule ^admin/.*$ - [F]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php?url=$1 [QSA,L]
This does the reverse work, I am able to access frontend and not admin with this code.
Thanks.
3
Answers
It is not possible to achieve this through .htaccess. At least not as a permanent solution. You could block access to edit pages but you will have to constantly edit .htaccess. Also you will have to make sure that you have all the paths right.
Magento has a builtin function to block editing. If it doesn’t do what you want you should look into some magento plugins or create one yourself.
Also your question is a too broad. You should provide at least an example of what you have tried and explain what doesn’t work.
Any petition to an URL not containing ‘admin’ will redirect to index.php. Add some message “under maintenance” and you’re done:
Try this solution. It will put in maintenance for clients but you can add users ips to access admin and fronted.
Edit index.php add this lines:
Change line
to
Solution from:
http://inchoo.net/magento/maintenance-mode-in-magento/