How to redirect directory by php

This is simple query and good things in mind to “how to redirect directory by php” , here is different methods for redirecting like by htaccess , meta-refresh tag, But htaccess is good , not good i say batter but this can damage your full domain and show error. So if you want to learn how to redirect by htaccess then go here >> (This is not so much difficult- first try this if not working show error reedit htaccess and use this method)

So now redirect by php
  1. Make a php file in your computer
  2. Write code in this –
  3. <?php  header(Location:; ?>

  4. Now name this index.php 
  5. Next go to your directory which you want to redirect
  6. Upload this file to that directory
  7. Now refresh your directory and you have done this.
  8. If any problem or query write me in comment box.


3 responses to “How to redirect directory by php”

  1. Avatar

    This web site certainly has all of the info I needed about this subject and didn’t
    know who to ask.

  2. Avatar

    Hello, after reading this amazing post i am as well delighted to share my experience here with colleagues.

  3. unblocked Avatar

    Hello colleagues, its great article on the
    topic of cultureand entirely explained, keep it up all the time.

Leave a Reply

Your email address will not be published. Required fields are marked *