Very Simple Redirect! (Meta Refresh)

Discussion in 'Programming' started by Elliot02, Sep 13, 2017.

  1. Elliot02

    Elliot02 Aspirant

    36
    13
    +8
    Instant Redirect:
    Code:
    <html>       
       <title>The Admin Zone!</title>     
       <meta http-equiv="refresh" content="0;URL='http://theadminzone.com/'" />   
    </html> 
    If you have your forums in say, /forums/ and want to redirect to it you can use this simple redirect. It helps because you can add little things to this code to run before going. For example, you could do something to give a little bit of information.
    Code:
    <html>      
       <title>The Admin Zone!</title>     
       <meta http-equiv="refresh" content="5;URL='http://theadminzone.com/'" /> 
    <b> Please make sure to be respectful! </b>  
    </html>
    By changing content="0 to 5 this will add 5 seconds until the redirect initiates. This will allow the user time to read the <b> Please make sure to be respectful! </b>

    this is super simple, and there probably is a better way but this is how i've done it.
     
  2. mysiteguy

    mysiteguy Devotee

    2,060
    887
    +1,382
    From an SEO perspective a 301 redirect is the way to go.
     
  3. Elliot02

    Elliot02 Aspirant

    36
    13
    +8
    If my understanding is correct, then a 301 redirect is only more beneficial if you had content on the page previously that ranked well.
     
Verification:
Draft saved Draft deleted