TorabRamin Posted March 27, 2019 Share Posted March 27, 2019 Form WHMCS client area when I clicked on "Login to cPanel" or "Login to WHM" from action tab it redirect to cPanel with the main server url. So my question is how can I control this redirect url and use custom url or IP? I don't want that My client will see the orginal server url. Note:- I'm have dedicated IP (I put my dedicated IP in hostanme from whmcs server setup option ) but it's not redirect to my Dedicated IP it's directly redirect to main server domain and then in to user cPanle 0 Quote Link to comment Share on other sites More sharing options...
penguin Posted March 27, 2019 Share Posted March 27, 2019 You would normally redirect to the hostname of the server or otherwise the user will get an SSL warning as the certificate will not match the url or IP address that you are redirecting them to. WHM itself also has redirect settings in the tweak settings section and will normally redirect to the hostname as well from there, so even accessing it by it's IP address it will then redirect to the SSL secured hostname 1 Quote Link to comment Share on other sites More sharing options...
brian! Posted March 27, 2019 Share Posted March 27, 2019 you can change the cPanel/Webmail links using the hook I posted tin the thread below... and I was recently asked to modify it to use Single Sign On... you should be able to modify either hook for your needs, but if you can't, let me know. 1 Quote Link to comment Share on other sites More sharing options...
steven99 Posted March 27, 2019 Share Posted March 27, 2019 @WHMCS Peter's reply on a similar thread might be a another solution: 1 Quote Link to comment Share on other sites More sharing options...
TorabRamin Posted March 28, 2019 Author Share Posted March 28, 2019 First of all Thank you all, I'm new here I didn't expect that I will get any response in a short time. You guys are awesome. Specially @brian! man you are life saver. I created a .php file on hooks folder and place your code their. It's perfectly redirect with user domain not with main server link 😚. But now the problem is after redirect to cPanle or Webmail it's not login automatically (previous time user can login by one click from client panel area, they don't need to put cPanle username and pass). Is it possible to make one click login from client area but with their own domain name? Note:- After clicking I'm getting type type of URL http://name.com:2082/unprotected/redirect.html?goto_uri= 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted March 28, 2019 Share Posted March 28, 2019 10 hours ago, TorabRamin said: Specially @brian! man you are life saver. thanks! 🙂 10 hours ago, TorabRamin said: I created a .php file on hooks folder and place your code their. It's perfectly redirect with user domain not with main server link 😚. But now the problem is after redirect to cPanle or Webmail it's not login automatically (previous time user can login by one click from client panel area, they don't need to put cPanle username and pass). Is it possible to make one click login from client area but with their own domain name? in that first link I gave you, there was another hook that creates a login form, and if your WHMCS contains the username/password to their service, then that can be used to login directly to their cPanel... ... though i'd suggest changing http to https and adding 1 to the ports uses for cPanel/Webmail (2083 & 2096)... that second link I gave you does contain an updated version of the above hook that doesn't need username/password for the cPanel link, but it uses the default URL of clientarea.php?action=productdetails&id=xxx&dosinglesignon=1 for the cPanel link - which is no good for you as that's the URL you're having problems with. if you can't get that second hook to suit your needs, then as @penguin suggests, you might be better off changing your WHM (not WHMCS) redirection settings - you may need to contact your host for help with that. 1 Quote Link to comment Share on other sites More sharing options...
TorabRamin Posted March 31, 2019 Author Share Posted March 31, 2019 Nothing workers for me. I was posted on cPanel community one guy give me a tips now it's perfectly working for me. I edit Server WHMCS:- remove hostname (leave it blank) edit the IP and put your domain in there. 0 Quote Link to comment Share on other sites More sharing options...
Rk Barnwal Posted November 30, 2022 Share Posted November 30, 2022 I am also facing an problem, which is When users try to do auto login cpanel from clientarea then redirect to ip address url like 1.0.0.27:2083, but i want to redict to my hostname url. can anyone give the solution ? 0 Quote Link to comment Share on other sites More sharing options...
leemahoney3 Posted December 1, 2022 Share Posted December 1, 2022 If you visit the hostname normally (i.e. outside of whmcs), does it redirect to the IP address also? 0 Quote Link to comment Share on other sites More sharing options...
Metrotechs Posted February 16, 2023 Share Posted February 16, 2023 On 12/1/2022 at 2:10 PM, leemahoney3 said: If you visit the hostname normally (i.e. outside of whmcs), does it redirect to the IP address also? Since I am having this issue as well, I figured I'd reply to your comment. If I replace the IP address with the subdomain where WHM/CPanel sit, it does not redirect back to the IP address. It continues through the clients CPanel without issue. 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.