Results 1 to 26 of 26

Thread: redirect page?

  1. #1
    Join Date
    Apr 2004
    Location
    West Coast
    Posts
    86

    redirect page?

    Can someone please give me the code for a simple redirect page?
    Thanks!

  2. #2
    Join Date
    Feb 2004
    Posts
    362
    If you have CPanel it has a feature that can do that for you. All you have to do is type in the addresses.
    Cory Pippen
    San Diego Direct Web, LLC
    1-866-611-3604

  3. #3
    Join Date
    Apr 2004
    Location
    West Coast
    Posts
    86
    I have Ensim Control Panel.
    But the code in an htm page would do!

  4. #4
    PHP Code:
    <?
    header 
    ("location: http://destination_url");
    ?>
    TopQHost - We Provide Affordable Web Hosting with Top Quality Service

  5. #5
    Join Date
    Apr 2004
    Location
    West Coast
    Posts
    86
    It is an htm page I use there, and you wrote php, and I remember something about timing, like the seconds until you will be redirected...

  6. #6
    Join Date
    Nov 2003
    Location
    Orange County, CA
    Posts
    1,182
    Originally posted by Alsenor
    It is an htm page I use there, and you wrote php, and I remember something about timing, like the seconds until you will be redirected...
    That would be a meta refresh.

    http://www.tizag.com/htmlT/meta.php
    DreamHost Web Hosting
    Shared and VPS hosting + dedicated servers and colocation.
    ... and we're green, too!
    Hosting your dreams since 1997.

  7. #7
    or something like this?

    Code:
    <script>
        setTimeout('reload()', 5)
        function reload() {
            window.location='destination_url'
        }
    </script>
    TopQHost - We Provide Affordable Web Hosting with Top Quality Service

  8. #8
    Join Date
    Apr 2004
    Location
    West Coast
    Posts
    86
    I put this exactly in the head, but it does not do it:

    <?
    header ("location: http://d4783683.u57.nashusa.net/");
    ?>

    PS.: Have to try again, cause I put 2x http://

  9. #9
    Join Date
    Nov 2003
    Location
    Orange County, CA
    Posts
    1,182
    Originally posted by Alsenor
    I put this exactly in the head, but it does not do it:

    <?
    header ("location: http://http://d4783683.u57.nashusa.net/");
    ?>
    The file must have a .php extension.

    If I were you, I would make the page contain ONLY that code, since it is going to be redirected anyway.
    DreamHost Web Hosting
    Shared and VPS hosting + dedicated servers and colocation.
    ... and we're green, too!
    Hosting your dreams since 1997.

  10. #10
    that's php so it must be in a php file. for example, put that code in index.php then visit the index.php page and you will be redirected.
    TopQHost - We Provide Affordable Web Hosting with Top Quality Service

  11. #11
    Join Date
    Apr 2004
    Location
    West Coast
    Posts
    86
    I just did exactly that, renamed the index.htp to index.php - but it doesn't do it!

  12. #12
    are you sure php works on your server? also, you have two http's in your url: http://http://d4783683.u57.nashusa.net/
    TopQHost - We Provide Affordable Web Hosting with Top Quality Service

  13. #13
    Join Date
    Nov 2003
    Location
    Orange County, CA
    Posts
    1,182
    Originally posted by benjohngf
    are you sure php works on your server?
    That was going to be my guess.

    also, you have two http's in your url: http://http://d4783683.u57.nashusa.net/
    That was fixed in an edit.
    DreamHost Web Hosting
    Shared and VPS hosting + dedicated servers and colocation.
    ... and we're green, too!
    Hosting your dreams since 1997.

  14. #14
    Originally posted by miakeru

    That was fixed in an edit. [/B]
    yep, noticed that after making the post
    TopQHost - We Provide Affordable Web Hosting with Top Quality Service

  15. #15
    Join Date
    Apr 2004
    Location
    West Coast
    Posts
    86
    Now I am in deep kaka....

    I made a .php page with this only:

    <php>
    <?
    header ("location: http://d4783683.u57.nashusa.net/");
    ?>
    </php>

    and got this as msg:

    Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/index.php:2) in /var/www/html/index.php on line 3

    I suppose by renaming the index.htm page I interfere with a redirect to my add-on domain folder.

    Any way to solve that?

    And what happens if both are there: index.htm and index.php?
    Last edited by Alsenor; 04-27-2004 at 11:09 PM.

  16. #16
    you do not need the beginning <php> and ending </php>
    TopQHost - We Provide Affordable Web Hosting with Top Quality Service

  17. #17
    Join Date
    Apr 2004
    Location
    West Coast
    Posts
    86
    did that stop it from working?

  18. #18
    did you try removing it?
    TopQHost - We Provide Affordable Web Hosting with Top Quality Service

  19. #19
    Join Date
    Apr 2004
    Location
    West Coast
    Posts
    86
    I removed the 2 php tags, but still get this msg:
    Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/index.php:2) in /var/www/html/index.php on line 3
    Look: http://66.49.139.66

  20. #20
    Join Date
    Apr 2004
    Location
    Green Bay, Wisconsin, USA
    Posts
    14
    <script language=javascript>
    <!--
    var timeout = "401";
    if (timeout >= "300") { setTimeout("timeoutWarning();",
    (timeout * "10")- "0");
    }function timeoutWarning() { var now = new Date((new Date()).getTime() + 0);
    var secs = now.getSeconds();
    secs = (secs < 10) ? "0"+secs : secs;
    var mins = now.getMinutes();
    mins = (mins < 10) ? "0"+mins : mins;
    var hours = now.getHours();
    hours = (hours < 10) ? "0"+hours : hours;
    { document.location.href = "URLGOESHERE";}}// --></script>
    BC Morgue Gaming Community
    http://www.bcmorgue.com
    CS 1.5: 24.106.36.66:27017 CS without all the BS!

  21. #21
    Join Date
    Apr 2004
    Location
    West Coast
    Posts
    86
    Thanks, this finally worked!
    I guess you set it to redirect without delay, and the line below
    would have to be changed if one wants a small delay, right?
    secs = (secs < 10) ? "0"+secs : secs;

  22. #22
    Join Date
    Apr 2004
    Location
    Phoenix, Arizona
    Posts
    151
    does this count as "simple" ?

    <HEAD>
    <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
    </HEAD>
    <BODY>
    <META HTTP-EQUIV=REFRESH
    CONTENT="1;URL=http://www.-whatever-.html">
    </BODY>

    I don't remember where I got this. It was so long ago. But, I still use it. I don't even know if the part in the head is needed.

    I do know the CONTENT="1;" means one second. So you change the number to make the delay longer.

    Looks like many ways to skin the digital cat ;-)

    Good luck.


    Dan
    http://www.IwantFUI.com
    If you could host a new kind of content from your old-fashioned web servers
    and make new money from your customers and differentiate your business all at the same time... could you afford not to try? See the new site

  23. #23
    Join Date
    Apr 2004
    Location
    West Coast
    Posts
    86
    Yeah, Dan - that looks like something I used a long time ago too.
    I remember the "refresh" term!
    Thanks a lot!

  24. #24
    Join Date
    Apr 2004
    Location
    Phoenix, Arizona
    Posts
    151
    Originally posted by Alsenor
    Yeah, Dan - that looks like something I used a long time ago too.
    I remember the "refresh" term!
    Thanks a lot!
    You are welcome. I'm sure there are HTTP gurus here who can disect it and tell you if that still works in all cases? all browsers?
    I dunno. Never had any reported trouble. But then again, who would bother to report it. I always put the expected manual link to the same place anyway JUST in case.

    Dan
    http://www.IwantFUI.com
    If you could host a new kind of content from your old-fashioned web servers
    and make new money from your customers and differentiate your business all at the same time... could you afford not to try? See the new site

  25. #25
    Join Date
    Apr 2004
    Location
    West Coast
    Posts
    86
    Actually worked like a charm - don't need any of the code in the head area!
    Thanks.

  26. #26
    Join Date
    Apr 2004
    Location
    Phoenix, Arizona
    Posts
    151
    Originally posted by Alsenor
    Actually worked like a charm - don't need any of the code in the head area!
    Thanks.
    Great.
    You're welcome.

    Dan
    http://www.IwantFUI.com
    If you could host a new kind of content from your old-fashioned web servers
    and make new money from your customers and differentiate your business all at the same time... could you afford not to try? See the new site

Posting Permissions

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