Question

We have a website and its working perfectly fine. We want to block users so they can't login into our admin section.

We have one public IP in our factory premises to access the internet and we locally make server to access the internet on other computers.

We want our website admin login section only accessibly within factory premises and no one can access the admin login section out of the factory or only specific registered user can login into admin section out the factory as well like our CEO and our project manager.

is this feature possible in Magento 1.9.2.3?

Hope you people understand my problem.

thanks

Was it helpful?

Solution

Its working perfectly fine:

RewriteCond %{REMOTE_ADDR} !^123\.123\.123\.123
RewriteCond %{REQUEST_URI} admin [NC]
RewriteRule ^(.*)$ / [F,L]

OTHER TIPS

You have to edit your .htaccess file and add the following:

RewriteCond %{REMOTE_ADDR} !^123.123.123.123

Where 123.123.123.123 is your IP address from your factory. This below is addon to route to another path as the usual path is not recommended anyway. So you could use anything instead of /admin to access the backend.

So for your needs you could change it to something cryptic and then make user accounts for CEO and Project manager. It will barely happen that someone tries something cryptic to enter your backend. Just replace /admin below with the new URL for the backend and then it will be accessible there.

RewriteCond %{REQUEST_URI} ^/(index.php/)?admin/ [NC]
RewriteRule ^(.*)$ http:// %{HTTP_HOST}/ [R=302,L]
Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top