Jump to content

cPanle redirection


TorabRamin

Recommended Posts

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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=

Link to comment
Share on other sites

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...

AXEm3yP.png

... 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.

Link to comment
Share on other sites

  • 3 years later...
  • 2 months later...
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. 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated