Making my portal.php my home page instead of index.php

Discussion in 'PHP' started by BigMark, Feb 26, 2007.

  1. #1
    Hello all, My website www.worldofmuscle.co.uk.

    When you click on this link it takes you straight to index.php what i would like is for this link to take you to portal.php how can i do this ..

    example: you click on my url and go to www.worldofmuscle.co.uk/index.php
    i would like you to go to www.worldofmuscle.co.uk/portal.php

    regards Mark
     
    BigMark, Feb 26, 2007 IP
  2. norfstar

    norfstar Peon

    Messages:
    1,154
    Likes Received:
    62
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Hi there Mark,

    I'm not sure what server software you're using, but if it supports .htaccess (Linux with Apache most likely will), put the following line in your .htaccess file:

    DirectoryIndex portal.php

    If you don't have a .htaccess file, open up Notepad (or a similar text editor), put the line above in, save as .htaccess (so no file name at all, the extention is htaccess) and upload.
     
    norfstar, Feb 26, 2007 IP
  3. Ardolix

    Ardolix Peon

    Messages:
    29
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    If you want only redirection, you can add in the start of index.php following php code:
    header("Location: http://www.worldofmuscle.co.uk/portal.php"); exit;
     
    Ardolix, Feb 26, 2007 IP
  4. BigMark

    BigMark Guest

    Messages:
    2
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    hey, Thanks for the replies. I dont just want a redirect cheers ardolix, although thats handy code for the future.
    I cant get the .htacccess to work i get an error either way i add the file.
     
    BigMark, Feb 26, 2007 IP