January 5, 201115 yr I have a site which I am taking down, but we still need access to the admin section - how would I do this? So basically the whole site is down, with a holding page (index.html - static) but the only directory you could get to is the admin - I have never used magento - so I need some help with this asap Cheers
January 5, 201115 yr There is an offline maintenance extension available, or you can modify the .htacccess and pipe everything to holding-page.html instead of index.php (if you do that you will need to make an exception for admin requests though)
January 5, 201115 yr Author Ok Jock - thanks - how would I do that via htaccess mate? I am not brilliant at this side of things. So in my htaccess file - how do I redirect EVERYTHING, except the admin section back to the new holding page? Cheers buddy - much appreciated... I can see a user award coming your way ;p
January 5, 201115 yr got to admit I dont really know because I dont use magento vry often, try RewriteEngine On RewriteCond %{REQUEST_FILENAME} -s [OR] RewriteCond %{REQUEST_FILENAME} -l [OR] RewriteCond %{REQUEST_FILENAME} -f RewriteRule ^.*$ /holding-page.html [NC,L] RewriteRule ^/admin/$ /index.php/admin/ [NC,L] then go to /index.php/admin/ Edited January 5, 201115 yr by Jock
January 5, 201115 yr kinda guessing here RewriteEngine On RewriteCond %{REQUEST_FILENAME} -s [OR] RewriteCond %{REQUEST_FILENAME} -l [OR] RewriteCond %{REQUEST_FILENAME} -f RewriteRule ^.*$ - [NC,L] RewriteRule ^.*$ /holding-page.html [NC,L] then index.php/admin again to get into admin
January 5, 201115 yr Author Ok cool - that works mate See here: linky linky BUT - if you hit /index.php it will show the old homepage - any final ideas? Cheers Jock
January 5, 201115 yr I have never used magento but you could try doing a redirect from index.php to the holding page e.g. RewriteRule ^index\.php$ index.html [NC,R] You should *cross fingers* still be able to access the admin.
January 5, 201115 yr not sure if this would work but what about blocking it from every1 except you/your clients ip? It should still allow people to see the holding page. <Files index.php> Order allow,deny Deny from all Allow From 123.123.123.123 </Files> There should be a way of still accessing the admin urls but not the rest of the site, I just dont know what the expression is, I'd fire it up on stackoverflow and see if you get any joy there. You could also re-write the ZF routes within magento... might be a bit overkill though.
January 5, 201115 yr all you need to do to put magento into maintainance mode is to create a new file called maintenance.flag in the root.. and err that's it If you dont want to freeze yourself out you can edit index.php around line 57 add $ip = $_SERVER['REMOTE_ADDR']; $allowed = array('xxx.xxx.xxx.xxx','xxx.xxx.xxx.xxx'); ( where xxx.xxx.xxx.xxx ip addresses. ) then change the line if (file_exists($maintenanceFile)) { to if (file_exists($maintenanceFile) && !in_array($ip, $allowed)) { you can see the site and anyone else will get maintenance. hope this helps Andy Dx3webs
Create an account or sign in to comment