FTP Question

Discussion in 'HTML & Website Design' started by webpromoterservice, Jul 21, 2009.

  1. #1
    I have a question.Excuse my ignorance in this matter,i am not a web designer.

    I uploaded a site using ftp and the home page is shop.php. I wanted it to upload it to the root directory / but i am not sure how to do this now.Will i have to reupload this site?

    Any help would be greatly appreciated
     
    webpromoterservice, Jul 21, 2009 IP
  2. -Hammad-

    -Hammad- Peon

    Messages:
    37
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Upload whatever you want to the folder 'public_html'; that's where whatever you want to display is retrieved from (excuse my wording :p). And rename the 'shop.php' file to 'index.php' because if the directory doesn't contain an index.php/.html file, it will just display the contents of the folder in a list, instead of taking you to the homepage (which is normally index.php or index.html).
     
    -Hammad-, Jul 21, 2009 IP
  3. champion510

    champion510 Member

    Messages:
    379
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    35
    #3
    Correct! :)
     
    champion510, Jul 21, 2009 IP
  4. xopacuo

    xopacuo Peon

    Messages:
    69
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #4
    i'm not quite sure but i think there was a way to change the default loading page with htaccess, if your home page have to be shop.php ( if there are some links connected with it) try finding way to redirect home page.
     
    xopacuo, Jul 21, 2009 IP
  5. lufty

    lufty Active Member

    Messages:
    248
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    60
    #5
    Use the following command in your .htaccess file:

    DirectoryIndex shop.php

    This would cause shop.php to be treated as your default page, or default directory page.
     
    lufty, Jul 31, 2009 IP
  6. miteshrami

    miteshrami Peon

    Messages:
    2
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Rename the file shop.php to index.php and then upload it in public_html folder using ftp...
     
    miteshrami, Jul 31, 2009 IP
  7. jamespv85

    jamespv85 Peon

    Messages:
    238
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Sometimes it might not be /public_html, so best if you ask your hosting company about this. Or you can refer to DocumentRoot from phpinfo() function. :)
     
    jamespv85, Aug 1, 2009 IP
  8. neddyy

    neddyy Peon

    Messages:
    21
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #8
    This is not a FTP problem. As others have pointed out you need to rename the file to 'index.php'.
     
    neddyy, Aug 2, 2009 IP
  9. champion510

    champion510 Member

    Messages:
    379
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    35
    #9
    Yup renaming file to index.php will do the trick.
     
    champion510, Aug 3, 2009 IP
  10. incomesinternational.com

    incomesinternational.com Peon

    Messages:
    187
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #10
    All of these answers are correct however you should be aware that if you use a .htaccess file to redirect your default page and you ever change the default any time in the future you will have to remove the entry from .htaccess.

    Another way to achieve the same result is to make the change to the httpd.conf file and add the filename to default page setting. This way you can use either shop.php or index.php and swap and change as you please without any issues.

    If it's a windows server that your using just add the file name to the defaul page settings in the IIS admin panel then arrange it so that shop.php is first in the list and index.php is second.