RedirectMatch 301 ^/cpanel https://yourhostname:2222
https://help.directadmin.com/item.php?id=599
The following should do it in /etc/httpd/conf/extra/httpd-alias.conf:
Code:RedirectMatch 301 ^/cpanel https://yourhostname:2222
Alternatively, you may use webapps.list and redirect using PHP file there:
Code:https://help.directadmin.com/item.php?id=599
Redirect 301 /cpanel https://yourserver.com:2222
Is your webserver apache? Even a simple line like this should work:
Code:Redirect 301 /cpanel https://yourserver.com:2222
Don't forget to restart apache after the changes.
Yes, that's fine for nginx_apache too You're welcome. I just see you've added it not to httpd-includes.conf, it means it'd overwrite your changes with rewrite_confs command, so, you'd better place it to another file.
Thank you!
Yes, that's fine for nginx_apache too You're welcome. I just see you've added it not to httpd-includes.conf, it means it'd overwrite your changes with rewrite_confs command, so, you'd better place it to another file.
Thank you!