how to do hidden redirect

Discussion in 'PHP' started by tarun, May 31, 2008.

  1. #1
    tarun, May 31, 2008 IP
  2. swordbeta

    swordbeta Banned

    Messages:
    225
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Please read this FAQ about mod_rewrite: http://forums.digitalpoint.com/showthread.php?t=23044
    This should be what your looking for, it should look like this;
    Options +Indexes
    Options +FollowSymlinks
    RewriteEngine on
    RewriteBase /
    RewriteRule ^xyz\.php$ sss\.php [L]
    Code (markup):
     
    swordbeta, May 31, 2008 IP
  3. effektz

    effektz Active Member

    Messages:
    474
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    60
    #3
    Another way, (although much less effective I'm sure) is to fopen the new page from inside the "old" page.

    $fp = fopen("sss.php", 'r');
    while (!feof($fp)) {
    $line = fgets($fp, 1024);
    print($line);
    }
    fclose($fp);
     
    effektz, May 31, 2008 IP
  4. CodyRo

    CodyRo Peon

    Messages:
    365
    Likes Received:
    15
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Uhh, just use mod_rewrite. That could get messy..
     
    CodyRo, May 31, 2008 IP
  5. tarun

    tarun Active Member

    Messages:
    219
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    51
    #5
    thanks for suggestion
     
    tarun, May 31, 2008 IP