HTML Page Redirection code

Discussion in 'HTML & Website Design' started by adomcruze, Jun 3, 2011.

  1. #1
    Hi every1.

    Want to get your help to know ".htaaccess" completely. please right here the html redirection code.
     
    adomcruze, Jun 3, 2011 IP
  2. robin84

    robin84 Greenhorn

    Messages:
    18
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    11
    #2
    Use this in your .htaccess file

    redirect 301 /olddirectory/oldfile.html http://example.com/newdirectory/newfile.html
     
    robin84, Jun 3, 2011 IP
  3. SkullTraill2

    SkullTraill2 Peon

    Messages:
    48
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    What robin said above is correct. Try that. You can also use 301 redirection code (search on google). It is also effective.
     
    SkullTraill2, Jun 3, 2011 IP
  4. adomcruze

    adomcruze Banned

    Messages:
    87
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Thanks Robin
     
    adomcruze, Jun 29, 2011 IP
  5. sp2h

    sp2h Peon

    Messages:
    189
    Likes Received:
    0
    Best Answers:
    1
    Trophy Points:
    0
    #5
    Redirection with HTML is using code META.. you want accual code let me know?
     
    sp2h, Jun 29, 2011 IP
  6. galstyan

    galstyan Peon

    Messages:
    7
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Hi Adom,

    You should try this one:
    <meta HTTP-EQUIV="Reload" content="0; url=Link">

    I hope this is helpful for you.
     
    galstyan, Jun 29, 2011 IP
  7. numeric303

    numeric303 Peon

    Messages:
    23
    Likes Received:
    2
    Best Answers:
    1
    Trophy Points:
    0
    #7
    you can try out this code on the index page hope it work just paste it somewhere within the body

    <script type="text/javascript">
    var cnt = 20;
    function countdown() {

    if (cnt <= 1) {
    measurement = "second";
    } else {
    measurement = "seconds";
    }
    if(cnt==-1){
    window.location.href='http://www.yourdomainname.com';

    //document.getElementById('hidden').style.display="block";
    //document.getElementById('timer').style.display="none";

    }else{
    document.getElementById('timercountdown').innerHTML = cnt + " " + measurement;
    cnt--;
    _timer = setTimeout("countdown()", 1000);
    }
    }

    var _timer = setTimeout("countdown()", 1000); // start ticking process
    </script>
    <span id="timercountdown"></span>
     
    numeric303, Jul 1, 2011 IP