Web Analytics Made Easy -
StatCounter Page redirect - CodingForum

Announcement

Collapse
No announcement yet.

Page redirect

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Page redirect

    I would like my domain to point to /index.php?id=news, rather than /index.php

    how can I do this?

  • #2
    This is how I do it.

    Code:
    <?php
    include("headers.php");
    
    if (is_file("$page.php")) {
    include("$page.php");
    }
    
    else {
    include("news.php");
    }
    
    include("footers.php");
    ?>
    and i just link to things like this

    <a href="index.php?page=media">Media</a>

    http://www.spiderseatbabies.com/swee...php?page=media

    Comment


    • #3
      I think they are just trying to get index.php to redirect to a new page when its called. You could place this at the top of index.php
      PHP Code:
      <?php
      header 
      ("Location: http://www.yourdomainname.com/index.php?id=news");
      ?>
      ||||If you are getting paid to do a job, don't ask for help on it!||||

      Comment


      • #4
        except the one you just gave me makes you have to change your cookie setting around..

        Comment

        Working...
        X