cancel
Showing results for 
Search instead for 
Did you mean: 

Changing default Magento URLs

Changing default Magento URLs

Hello,

 

I have a clent who would like to obfuscate the URL endpoints to discourage bot activity that targets stock Magento installations.

 

So, for example, the URL:

 

/customer/account/loginPost/

 

would be more like:

 

/client/account/signinPost/

 

This can't just be a redirect, because the old URL must not work in any way to prevent bots from trying to hit it.  So, any attempts at the stock Magento URL need to fail without exception, and only the customized URL will work.

 

What's the best way to tackle this?

2 REPLIES 2

Re: Changing default Magento URLs

You probably would need to overwrite LoginPost.php in a di.xml file, deactivate this route with a NotFoundException and create a new route in a custom module that does the same as the old route.

But it's not recommended and I don't think this is necessary.

Re: Changing default Magento URLs

Log in to your Magento Admin Panel. On the upper right, click System>Configuration. From the main menu, under the General list, click Web. Open the Unsecure and Secure drop-down lists, locate the base URL line, and replace this with the new URL. mywakehealth.org

 

Default Base URL:
http://example.com/magento/
Default Admin URL and Path:
http://example.com/magento/admin.