Find the answer to your Linux question:
Page 1 of 3 1 2 3 LastLast
Results 1 to 10 of 21
don't have any access to the website server, still can do the redirect or forward ? any ideas ?...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Aug 2011
    Posts
    24

    How to forward a website that is not host on my server ?


    don't have any access to the website server, still can do the redirect or forward ? any ideas ?

  2. #2
    Administrator jayd512's Avatar
    Join Date
    Feb 2008
    Location
    Kentucky
    Posts
    5,023
    So you're trying to redirect traffic from one website to another of your choosing?
    Might I ask why?
    Jay

    New users, read this first.
    New Member FAQ
    Registered Linux User #463940
    I do not respond to private messages asking for Linux help. Please keep it on the public boards.

  3. #3
    Just Joined!
    Join Date
    Aug 2011
    Posts
    24
    I hosted a website in web hosting company...they don't do forward a website to another website unless i paid every month, but they do point the website to my office server for free. so I have to find out how to do it after they point website to my server.

  4. $spacer_open
    $spacer_close
  5. #4
    Just Joined!
    Join Date
    May 2011
    Location
    Malaysia
    Posts
    39
    Hi,
    If the webserver in your office is an apache with php installed, a DirectoryIndex pointing to a simple php like this could probably work

    <?php
    header("Location: http://somesite.somewhere.com/");
    exit;
    ?>

  6. #5
    Just Joined!
    Join Date
    Aug 2011
    Posts
    24
    but the website(Source like html database) not host in my server still can do it ?

  7. #6
    Just Joined!
    Join Date
    May 2011
    Location
    Malaysia
    Posts
    39
    Sorry if i misunderstood.
    You mentioned the hosting company "points the website to your office server for free"?
    Can you explain what do you mean by that?

    Currently are you not able to edit/update the website hosted at the hosting company?

  8. #7
    Just Joined!
    Join Date
    Aug 2011
    Posts
    24
    they can redirect the website i hosted in their are server to my office server without any money charges.

  9. #8
    Just Joined!
    Join Date
    Aug 2011
    Posts
    24
    Currently are you not able to edit/update the website hosted at the hosting company?

    NO, I can't

  10. #9
    Just Joined!
    Join Date
    May 2011
    Location
    Malaysia
    Posts
    39
    Hi,
    I'm assuming this is what you meant by

    "they can redirect the website i hosted in their are server to my office server without any money charges"

    1. let's pretend your company website URL is www.abc.com
    2. your hosting company is redirecting any URL requests to www.abc.com to your office server.

    Assuming the scenario above is correct then that simple php i mentioned will work out fine.

    It goes like this:

    a. requests for www.abc.com gets redirected to your office server.
    b. in your office server just add that php to the default DirectoryIndex file
    c. your office server apache then sends the http requests to any other server your wish.

    I'm assuming your office server is a rhel running apache+php. I'm also assuming the server you wish to redirect has it's http content (html/dB/web application) has already been set up.

    I could also propose to use Apache's ProxyPass/ProxyPassReverse or even iptables forwards on your office server but that would be perhaps a bit more difficult to digest for now.

  11. #10
    Just Joined!
    Join Date
    Aug 2011
    Posts
    24
    so in my office server install apache and PHP then create the php file as above you just said. Should do the redirect ?
    the redirect.php file put in /var/www/html ? or somewhere else .
    can I just use any xxxx.php file name ?

Page 1 of 3 1 2 3 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •