Situatie
Method 1: Change Admin URL via env.php
- Open the file:
- Find this section:
- Change
'admin'
to your desired custom path, e.g.,'custom-admin'
: - Save and close the file (
CTRL + X
, thenY
, thenEnter
). - Flush Magento cache:
Now, your admin panel will be accessible at:
Method 2: Change Admin URL via CLI
Run the following command:
This will update the admin URL to:
Method 3: Block Access to Default /admin
in .htaccess
or nginx
For Apache, edit .htaccess
:
For Nginx, add this to your server block:
Restart the web server:
Leave A Comment?