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.

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)
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>
  • i had used <IfModule mod_rewrite.c> #301 redirect #first option throw them on home page redirect 301 /cpanel/ / </IfModule> – Salman Dalal Dec 29 '16 at 13:53
  • It does not works – Salman Dalal Dec 29 '16 at 13:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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