1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice
  2. Dear Pleskians, please read this carefully! New attachments and other rules Thank you!
    Dismiss Notice
  3. Dear Pleskians, I really hope that you will share your opinion in this Special topic for chatter about Plesk in the Clouds. Thank you!
    Dismiss Notice

Redirect :8443 secure site with fedora core 2

Discussion in 'Plesk for Linux - 8.x and Older' started by thundercon787, Jan 21, 2005.

  1. thundercon787

    thundercon787 Guest

    0
     
    Hello there.. I'm having some difficulties with this..I'm a webhosting provider that does servers and colocated spaces etc.. I'm trying to do redirects for a customer of mine.on his server..and its probably a stupid thing i'm doing so guys don't laugh too hard...

    Here's the scoup... I'm running plesk 7.5 reloaded on fedora core 2 os...

    I'm trying to redirect the https://domainname.com:8443 ...

    so that when my customer does this...or any of his..

    http://domainname.com/control

    it will take them to the above https control panel login screen

    I deal with alot of customers who like everything simplified..

    here is what i have tried so far..

    [root@web vhosts]# cd yourwebhosters.com
    [root@web yourwebhosters.com]# cd httpdocs
    [root@web httpdocs]# ls -al
    total 16
    drwxr-x--- 3 grubei1111 psaserv 4096 Jan 22 00:21 .
    drwxr-xr-x 19 root root 4096 Jan 22 00:21 ..
    -rwxr-xr-x 1 grubei1111 psacln 616 Jan 22 00:21 index.html
    drwxr-xr-x 2 grubei1111 psacln 4096 Jan 22 00:21 picture_library
    [root@web httpdocs]# "su grubei1111;echo "Redirect /control https://www.yourwebhosters.com:8443" >> .htaccess;exit;"
    -bash: su grubei1111;echo Redirect: command not found
    [root@web httpdocs]#

    and after that i was going to chown the user:group .htaccess file to his credentials...

    I can do the same command string on a cobalt box... but whenit comes to plesk it doesn't work...

    I am also running some microsoft dns servers for him.. (thats what this customer wanted) so if you guys think i can do it via that much easier please let me know..

    please email me... mtraynor@thundercon.com etc.. thanx

    -Mike
     
  2. cYon

    cYon Guest

    0
     
    Try the following command inside the httpdoc directory for the domain you want to redirect:

    mkdir <dir name>;chown user:group <dir name>;echo "Redirect /<dir name>/index.html https://domain.com:8443/" > <dir name>/.htaccess
     
  3. thundercon787

    thundercon787 Guest

    0
     


    Ok i did this see below...

    [root@web httpdocs]# chown grubei1111:psacln control;echo "Redirect /control/index.html https://yourwebhosters.com:8443" > control/.htaccess
    [root@web httpdocs]# ls -al
    total 20
    drwxr-x--- 4 grubei1111 psaserv 4096 Jan 22 01:57 .
    drwxr-xr-x 19 root root 4096 Jan 22 00:21 ..
    drwxr-xr-x 2 grubei1111 psacln 4096 Jan 22 02:05 control
    -rwxr-xr-x 1 grubei1111 psacln 616 Jan 22 00:21 index.html
    drwxr-xr-x 2 grubei1111 psacln 4096 Jan 22 00:21 picture_library
    [root@web httpdocs]# cd control
    [root@web control]# ls -al
    total 12
    drwxr-xr-x 2 grubei1111 psacln 4096 Jan 22 02:05 .
    drwxr-x--- 4 grubei1111 psaserv 4096 Jan 22 01:57 ..
    -rw-r--r-- 1 root root 61 Jan 22 02:05 .htaccess
    [root@web control]# chown grubei1111:psacln .htaccess
    [root@web control]# ls -al
    total 12
    drwxr-xr-x 2 grubei1111 psacln 4096 Jan 22 02:05 .
    drwxr-x--- 4 grubei1111 psaserv 4096 Jan 22 01:57 ..
    -rw-r--r-- 1 grubei1111 psacln 61 Jan 22 02:05 .htaccess
    [root@web control]#

    now when you try to surfthe url http://www.yourwebhosters.com/control or http://yourwebhosters.com/control gets a http 404 error.. can't be found.. does this mean i need the index.html there? and if so what do i put in it? etc... i'm sure were really close here ... so far so good..

    -Mike
     
  4. thundercon787

    thundercon787 Guest

    0
     


    Just for the heck of it... I tried editing the .htaccess file and it originally had
    Redirect /control/index.html https://yourwebhosters.com:8443 and changed it to
    Redirect /control https://yourwebhosters.com:8443
    still got a 404 error... so.. i am lost..

    anyone else have any suggestions?

    -Mike
     
  5. cYon

    cYon Guest

    0
     
    Hmm, I do not have a index.html, it's really not needed as /control/ should work. Everything you did looks correct not sure what the issue is.

    A quick fix would be to create the new file index.php in the directory:
    <?php
    header("Location: https://domain.com:8443/");
    ?>
     
  6. thundercon787

    thundercon787 Guest

    0
     
    ?

    I'm not sure what exactly your trying to have me do here

    -Mike
     
  7. cYon

    cYon Guest

    0
     
    basically instead of using a .htaccess file to forward the user to plesk. Just create a file named index.php in your control folder then add the above code and modify with your domain. Then when you access http://domain.com/control/ it will forward the user onto the contron panel.
     
  8. thundercon787

    thundercon787 Guest

    0
     
    Re: ?

    Ok I made a new file called index.php and inside it i did what you said to do...

    <?phpheader("Location:https://yourwebhosters.com:8443/");?>

    then saved it and followed to this..

    I also chmod the user:group, gave it 777 permissions and tested it out.. still not comming up..

    click it http://yourwebhosters.com/control

    here is what i did..

    [root@web control]# ls -al
    total 16
    drwxr-xr-x 2 grubei1111 psacln 4096 Jan 22 05:05 .
    drwxr-x--- 4 grubei1111 psaserv 4096 Jan 22 01:57 ..
    -rw-r--r-- 1 grubei1111 psacln 61 Jan 22 02:18 .htaccess
    -rw-r--r-- 1 root root 61 Jan 22 05:05 index.php
    [root@web control]# chown grubei1111:psacln index.php
    [root@web control]# ls -al
    total 16
    drwxr-xr-x 2 grubei1111 psacln 4096 Jan 22 05:05 .
    drwxr-x--- 4 grubei1111 psaserv 4096 Jan 22 01:57 ..
    -rw-r--r-- 1 grubei1111 psacln 61 Jan 22 02:18 .htaccess
    -rw-r--r-- 1 grubei1111 psacln 61 Jan 22 05:05 index.php
    [root@web control]# chmod +x index.php
    [root@web control]# chmod 755 index.php
    [root@web control]# ls
    index.php
    [root@web control]# ls -al
    total 16
    drwxr-xr-x 2 grubei1111 psacln 4096 Jan 22 05:05 .
    drwxr-x--- 4 grubei1111 psaserv 4096 Jan 22 01:57 ..
    -rw-r--r-- 1 grubei1111 psacln 61 Jan 22 02:18 .htaccess
    -rwxr-xr-x 1 grubei1111 psacln 61 Jan 22 05:05 index.php
    [root@web control]# chmod 777 index.php
    [root@web control]# ls -al
    total 16
    drwxr-xr-x 2 grubei1111 psacln 4096 Jan 22 05:05 .
    drwxr-x--- 4 grubei1111 psaserv 4096 Jan 22 01:57 ..
    -rw-r--r-- 1 grubei1111 psacln 61 Jan 22 02:18 .htaccess
    -rwxrwxrwx 1 grubei1111 psacln 61 Jan 22 05:05 index.php
    [root@web control]#

    would i have to change the redirect that we first innitially did from index.html to index.php and that should work? and if so shouldi used the same command string ro change it out.. i'm confused..

    -Mike
     
  9. cYon

    cYon Guest

    0
     
    Mike,
    Delete the .htaccess we do not need it anymore all you need is the index.php file with the code I gave you.

    You have the code shown as:
    <?phpheader("Location:https://yourwebhosters.com:8443/");?>

    The above will generate errors if that's what you used you need:
    <?php header("Location: https://yourwebhosters.com:8443/"); ?>
     
  10. thundercon787

    thundercon787 Guest

    0
     
    Hey cYon,

    Thanx a bunch.. I deleted out the .htaccess and took the redirect away and Put your link in and it worked.. Jsut make sure you give the permissions to the file and make sure its executable.. thanx alot man! It helped out!

    -Mike
     
Loading...