if i upload index.html and index.php...

Discussion in 'Site & Server Administration' started by devin, May 3, 2006.

  1. #1
    ...which one will show up when i type www.domain.com?

    also, if i need to change my index.html to index.php, what is the best way to do it without losing SERPs, PR, etc? 301 redirect? a line in .htaccess?
     
    devin, May 3, 2006 IP
  2. noppid

    noppid gunnin' for the quota

    Messages:
    4,246
    Likes Received:
    232
    Best Answers:
    0
    Trophy Points:
    135
    #2
    It depends on the apache config. I think there is a list of extensions to parse as index.xxx and it looks for an extension in the order the extensions are listed.

    If .html is first, as in my case, it looks for index.html and if it don't find one it then looks for index.php.

    If both index.html and index.php are there, it uses index.html.

    I think ya can do this in .htaccess as well, but I'm not an apache expert.
     
    noppid, May 3, 2006 IP
  3. theblight

    theblight Peon

    Messages:
    246
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Well it depends on the Default Settings on your Apache which is in the

    DirectoryIndex

    You can input

    DirectoryIndex index.php

    or

    DirectoryIndex index.html

    or

    DirectoryIndex index.html index.htm index.php filename.php

    as long as the files exist it will be loaded but you are at the mercy of which file the it will load first.
     
    theblight, May 3, 2006 IP
    noppid likes this.
  4. devin

    devin Guest

    Messages:
    4,461
    Likes Received:
    449
    Best Answers:
    0
    Trophy Points:
    0
    #4
    before i continue, please realise that i suck at anything other than HTML. :eek: so i'm afraid i have no clue what you're saying. noppid - i get what you mean though.
     
    devin, May 3, 2006 IP
  5. MattUK

    MattUK Notable Member

    Messages:
    6,950
    Likes Received:
    377
    Best Answers:
    0
    Trophy Points:
    275
    #5
    Jesus, that actually has to be the worst attempt at spam I've ever seen.
     
    MattUK, May 3, 2006 IP
  6. theblight

    theblight Peon

    Messages:
    246
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    0
    #6
    yup...we know where he is going...to the sandbox hehehe:D
     
    theblight, May 3, 2006 IP
  7. noppid

    noppid gunnin' for the quota

    Messages:
    4,246
    Likes Received:
    232
    Best Answers:
    0
    Trophy Points:
    135
    #7
    Agreed. but, we got the mods to remove it. Now it's in your post however! :eek:
     
    noppid, May 3, 2006 IP
  8. JB4375

    JB4375 Peon

    Messages:
    41
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #8
    ROFLMFAO!!

    JB
     
    JB4375, May 3, 2006 IP
  9. MattUK

    MattUK Notable Member

    Messages:
    6,950
    Likes Received:
    377
    Best Answers:
    0
    Trophy Points:
    275
    #9
    I don't think he's in any danger of hanging around long enough to be able to post live links.
     
    MattUK, May 3, 2006 IP
  10. noppid

    noppid gunnin' for the quota

    Messages:
    4,246
    Likes Received:
    232
    Best Answers:
    0
    Trophy Points:
    135
    #10
    No Doubt. Off to the cornfields!
     
    noppid, May 3, 2006 IP
  11. devin

    devin Guest

    Messages:
    4,461
    Likes Received:
    449
    Best Answers:
    0
    Trophy Points:
    0
    #11
    i reported him, so he's gone.

    uh, my question please? :D:D
     
    devin, May 3, 2006 IP
  12. MattUK

    MattUK Notable Member

    Messages:
    6,950
    Likes Received:
    377
    Best Answers:
    0
    Trophy Points:
    275
    #12
    Sorry Devin! :)
    Noppid had it spot on though, usually it's index.html or .htm that is pulled first unless your Apatche is set up differently.

    If you're just changing your index.html to index.php this won't make any difference to the serps.
     
    MattUK, May 3, 2006 IP
  13. devin

    devin Guest

    Messages:
    4,461
    Likes Received:
    449
    Best Answers:
    0
    Trophy Points:
    0
    #13
    you sure about this? :) will i lose PR too? or it doesn't matter since it can be recouped, since inbound links point to www. domain. com which, in effect, is index.php?
     
    devin, May 3, 2006 IP
  14. MattUK

    MattUK Notable Member

    Messages:
    6,950
    Likes Received:
    377
    Best Answers:
    0
    Trophy Points:
    275
    #14
    If the links all point to domain.com and not domain.com/index.html you'll be fine, they'll just point to whatever Apatch defaults to.
    You'll retain you IBLs and PR will be the same as it was before.
     
    MattUK, May 3, 2006 IP
    devin likes this.
  15. devin

    devin Guest

    Messages:
    4,461
    Likes Received:
    449
    Best Answers:
    0
    Trophy Points:
    0
    #15
    thanks! i'll take your word on it and make the change then! :) thank god it wasn't some inner pages that ranked high on SEs. :D
     
    devin, May 3, 2006 IP
  16. devin

    devin Guest

    Messages:
    4,461
    Likes Received:
    449
    Best Answers:
    0
    Trophy Points:
    0
    #16
    okay this is so strange. i uploaded the php version of the home page, with the code in it. and when i opened in my browser i get the "You have chosen to open this file..." message in firefox.

    i merely saved the file as php and uploaded it, is there aything else i need to be doing?
     
    devin, May 3, 2006 IP
  17. MattUK

    MattUK Notable Member

    Messages:
    6,950
    Likes Received:
    377
    Best Answers:
    0
    Trophy Points:
    275
    #17
    At this point I'd check with your host to see if the settings in Apatche are correct
     
    MattUK, May 3, 2006 IP
  18. devin

    devin Guest

    Messages:
    4,461
    Likes Received:
    449
    Best Answers:
    0
    Trophy Points:
    0
    #18
    my host solved it for me this morning. thanks again! :)
     
    devin, May 3, 2006 IP
  19. MattUK

    MattUK Notable Member

    Messages:
    6,950
    Likes Received:
    377
    Best Answers:
    0
    Trophy Points:
    275
    #19
    No worries, glad you sorted it out! :)
     
    MattUK, May 4, 2006 IP