Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

php to add redirect

Discussion in 'General Discussion' started by syns0r, Oct 1, 2007.

  1. syns0r

    syns0r Registered

    Joined:
    Aug 2, 2006
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    151
    I am trying to create a php script to add a redirect to cpanel 11 but am having trouble getting the address correct.

    Is this correct url?
    http://$cpuser:$cppass@$cpdomain:2082/frontend/$cpskin/mime/addredirect.html?path=$fromurl&ur=$tourl&type=$redtype

    it keeps giving me a 404
    any help appreciated?
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  2. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    16,170
    Likes Received:
    370
    Trophy Points:
    583
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    Check this page to the official cPanel demo for domain owner.
    http://www.cpanel.net/products/cPanelandWHM/linux/try_cp_whm.htm

    You might use that URL in your code and see how it goes. It looks like this.
    http://x3demob.cpx3demo.com:2082/login/?user=x3demob&pass=x3demob
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. syns0r

    syns0r Registered

    Joined:
    Aug 2, 2006
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    151
    hmmm it just doesn't like the $user:$pass@$domain:2082
    to use that other way of loggin in I guess I will have to do a 2 step process through curl or something?
    what I don't get is that how come this way of loggin in works for creating email addresses but not this redirect?
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice