No announcement yet.


  • Filter
  • Time
  • Show
Clear All
new posts

  • redirecting...

    hey there.
    i need the complete code and instructions for making a redirect php file...

    i want to do like this

    if a user types in the url, and that url has moved, he will get a message that says something like this "this page has moved to (the new url), you will be redirected in 5 seconds"

    and then after 5 seconds he will be redirected to the new url...

    as i said, i need the complete code to do this

    any help is much appriciated!


  • #2
    depends on what you mean as wrong url, do you mean everything, or just one page. Coz if its everything, you'll need to make a .htaccess file


    • #3
      the forums has moved... i just need to do something so that when a user clicks in the old board url, he will instead of the board, get a short message, which will tell the user that in 5 seconds he will be redirected to the new url... a timed redirect

      i don't have a clue on how to do this
      Last edited by Kasper_H; Sun 7 Oct '01, 5:18pm.


      • #4
        I think this is what you're looking for..

        There are a couple of ways to do this. One way would be using a Meta refresh (if you want to delay XX number of sections before forwarding so users can read a message - i.e. bookmark the new location):

        <META HTTP-EQUIV='Refresh' CONTENT='5; URL=http://url.toyour.boards/'>
        CONTENT='5; is the amount of time in seconds prior to your user being redirected.

        You could also user a php header function for a quick and easy redirect (just make sure there is no output prior to the header function or you'll get a lovely header already sent error):

        <? header ("Location: http://url.toyour.boards/"); ?>
        Hope this helps,


        • #5
          Open notpad and enter the following:

          ErrorDocument 404 /moved.php

          Goto save and select all files, then rename it to .htaccess

          Then create a page and put that meta code in and save it as moved.php

          Then put both the moved.php and .htaccess into the folder which your forums use to be at

          Therefore anypage they enter in the folders after that folder will put that page up


          • #6
            thanks both of ya! it worked


            • #7
              Yay, I feel like I have saved the world ^_^


              Related Topics