Redirect from one directory to another

Everyone need to redirect from one directory to another in their website ,like in my website from > liveurlifehere.com/blog to blog.liveurlifehere.com. Here is many way to redirect from one page to another page. or from one directory to another. Today, i write these methods for redirecting.

Five ways  for redirection
  1. By .httaccess
  2. By php
  3. By html
  4. By Meta tag
  5. By javascripts

These methods we can use for redirection . Basically by my experience better method is no.1 but this is difficult for new guys. So easy method is by php (no.2), In this only one line program is written and  page/directory is redirect. Same by html & javascript, you just need to write a script i.e

  • Redirect by HTML and javascript

<script>

top.location(‘YOUR_URL’);

</script>

For redirect by php page , you write this code:

<?php

header(“Location:http://www.liveurlifehere.com”);

?>

 

Leave a Comment