4

I had created an ecommerce website named http://example.com. I want to block my cpanel link for users who are accessing my website. Link is example.com/cpanel. If any I.T. specialist user or general user go to my http://example.com/cpanel link then he should go on my homepage link.

2 Answers 2

6

First thing you need to understand is that: for a webserver, both the owner and normal site visitors are the same. There is no default mechanism to identify a "Site owner".

To achieve your goals, you can do below:

There is an option for your hosting provider to enable WHM > Security Center > Configure Security Policies area that is called "Limit logins to verified IP Addresses"

If your provider has not enabled this, I would suggest contacting that provider to request they consider doing so. We have had this option available for at least 9 months in WHM.

  • Magento admin: I strongly recommend to change the default admin path to something like myAdmin324. You can make this change either in your local.xml (Check this url) or via your admin interface (Check this url)
8
  • can you please guide me how to change admin link in local.xml Commented Oct 15, 2016 at 15:21
  • magento.stackexchange.com/questions/40620/… Commented Oct 15, 2016 at 15:38
  • this url worked for me to do the admin login url change. Commented Oct 15, 2016 at 15:38
  • glad to know it helped, accept it as answer to help others
    – Nidheesh
    Commented Oct 15, 2016 at 15:42
  • Yeap but i still dont know how to use cpanel login from one or more ips Commented Oct 15, 2016 at 15:45
1

I think you can use 301 url redirect for this issue you can send them 404 page of your magento or send them home page when they access your cpanel.

Add below code in your .htaccess file

<IfModule mod_rewrite.c>
 #301 redirect #first option throw them on home page 
 redirect 301 /cpanel/ /
 redirect 301 /cpanel/ /your404urlpage
</IfModule>
2
  • i had used <IfModule mod_rewrite.c> #301 redirect #first option throw them on home page redirect 301 /cpanel/ / </IfModule> Commented Dec 29, 2016 at 13:53
  • It does not works Commented Dec 29, 2016 at 13:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.