Index.php on window Server

Discussion in 'HTML & Website Design' started by El-Plaga, Jul 5, 2007.

  1. #1
    Is there a way i can have it where when someone goes to my domain, www,domain,com they can see the /index.php file without having to type in www,domain,com/indexphp
     
    El-Plaga, Jul 5, 2007 IP
  2. Magnus

    Magnus Peon

    Messages:
    164
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #2
    in the httpconf file in the apache dir, there should be a line with index files. add index.php to that.
     
    Magnus, Jul 5, 2007 IP
  3. El-Plaga

    El-Plaga Banned

    Messages:
    359
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #3
    I dont have that dir on my hosting....
     
    El-Plaga, Jul 5, 2007 IP
  4. El-Plaga

    El-Plaga Banned

    Messages:
    359
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Is that only on linux hosting servers?
     
    El-Plaga, Jul 5, 2007 IP
  5. Gangsta

    Gangsta Active Member

    Messages:
    145
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    53
    #5
    Tell me more about your server
    what server do you use?

     
    Gangsta, Jul 5, 2007 IP
  6. ColorWP.com

    ColorWP.com Notable Member

    Messages:
    3,121
    Likes Received:
    100
    Best Answers:
    1
    Trophy Points:
    270
    #6
    Maybe the default index file is set to "index.html", you can create it and put a redirect to "index.php". EX:

    
    <html>
    <head><meta http-equiv="refresh" content="1; url=index.php"></head>
    <body onload="document.location='index.php'">
    <script>document.location('index.php');</script>
    <noscript><a href="./index.php">Go to site!</a></noscript>
    </body>
    </html>
    
    HTML:
    Or something like that.
     
    ColorWP.com, Jul 6, 2007 IP
  7. MatthewN

    MatthewN Well-Known Member

    Messages:
    859
    Likes Received:
    30
    Best Answers:
    0
    Trophy Points:
    195
    #7
    Start > Administrative Tools > Internet Information Services

    Open ServerName
    Open Websites
    Highlight your website
    Right click and click properties
    Click the Documents Tab
    Make sure enable default content page is checked
    Add
    Type index.php
    Click ok
    Click ok
    Close IIS

    It will now work :)

    If you do not have access to the server through RDP/PCA/VNC or whatever then contact the host.

    If you have a control panel let us know what it is and I will let you know how to adjust it in your control panel.
     
    MatthewN, Jul 6, 2007 IP
  8. El-Plaga

    El-Plaga Banned

    Messages:
    359
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #8
    Yes i dont have access to it like a server. I have a cpanel. The hosting company is Ix Web Hosting. Its the Win Unlimited plan.
     
    El-Plaga, Jul 6, 2007 IP
  9. MatthewN

    MatthewN Well-Known Member

    Messages:
    859
    Likes Received:
    30
    Best Answers:
    0
    Trophy Points:
    195
    #9
    I didnt realise CPanel was available for windows yet. I recomment just sending a ticket to the host asking them to set index.php as a default document for your domain. It's just a 1 minute job to do on the server.
     
    MatthewN, Jul 6, 2007 IP
  10. ansi

    ansi Well-Known Member

    Messages:
    1,483
    Likes Received:
    65
    Best Answers:
    0
    Trophy Points:
    100
    #10
    create a file named .htaccess (with the period) and inside of it put
    
    DirectoryIndex index.php index.htm index.html
    
    Code (markup):
    this will make the default page for that directory one of either index.php, index.html, or index.html
    then simply upload it to the directory which you want to use it on
     
    ansi, Jul 6, 2007 IP
  11. MatthewN

    MatthewN Well-Known Member

    Messages:
    859
    Likes Received:
    30
    Best Answers:
    0
    Trophy Points:
    195
    #11
    I didnt think .htaccess was supported on IIS by standard.
     
    MatthewN, Jul 6, 2007 IP
  12. ansi

    ansi Well-Known Member

    Messages:
    1,483
    Likes Received:
    65
    Best Answers:
    0
    Trophy Points:
    100
    #12
    he said nothing about IIS. i'm currently running Apache2 on windows xp. but in the case that he is running IIS, then no, it won't work.
     
    ansi, Jul 6, 2007 IP
  13. El-Plaga

    El-Plaga Banned

    Messages:
    359
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #13
    Ok, i put in a ticket with the hosting company. If they cant change it, should i just get a linux based hosting and i will be ok
     
    El-Plaga, Jul 6, 2007 IP
  14. AstarothSolutions

    AstarothSolutions Peon

    Messages:
    2,680
    Likes Received:
    77
    Best Answers:
    0
    Trophy Points:
    0
    #14
    You can normally change the default documents via the control panel, we certainly can with our Helm control panel.

    If your host is running IIS you will be better off moving across to an Apache based webhost as IIS doesnt support the likes of .htaccess and mod url rewrite thingy. These are not an issue with .Net as it has its own way of doing these things but is an issue for PHP users
     
    AstarothSolutions, Jul 6, 2007 IP
  15. El-Plaga

    El-Plaga Banned

    Messages:
    359
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #15
    Can anyone recommend me an host that i can use. This is for a file sharing site. So would like to have as much space as possible or at least unlimited.

    Paid $100 for this hosting i have right now for 3 months, guess ill just sit on it and let it rot or something.
     
    El-Plaga, Jul 6, 2007 IP
  16. El-Plaga

    El-Plaga Banned

    Messages:
    359
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #16
    I got it to work now, Needed to add index.php to the directory indexes.

    Thought i did that last night, guess i over looked up but hosting people saying on win servers by default its set without it, got to manually add it in.

    Thanks for all the help and replies you guys gave me. Got me thur that night of hell.
     
    El-Plaga, Jul 6, 2007 IP