Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Magento help URGENT!

Featured Replies

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

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)

  • 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

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 by Jock

  • Author

Unfortunately that produced a server 500 error - any ideas? eeeek!

  • Author

Hey mate - don't worry, I got there in the end :)

 

Thanks

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

  • 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 :)

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.

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.

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

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.