Results 1 to 5 of 5
  1. #1
    Anas is offline Freshman
    Join Date
    Dec 2009
    Location
    Pakistan
    Posts
    22
    Thanks
    24
    Thanked 0 Times in 0 Posts
    Feedback Score
    0

    Unhappy Apache doesn't recognise index.php as the Index Page....

    Hello friends,

    I am a windows user. A few days ago, I set up, apache 2.2, php 5.3.x and mysql 5.1.x on my local computer. Now every thing is working well. The only problem is that my server does not automatically recognize the index.php file present in my directories as the index page and present it when ever the address of a directory is written in the web browser. However, when I manually write the name of a php file then it loads it correctly and without any problem. for example, When I write http://localhost/forum/ in my web browser then It just show me the list of all files present in the /forum/ directory while when I write http://localhost/forum/index.php then it load the index page of my forum properly.

    Any suggestion about how to fix it and make my server automatically recognize the index.php files as The index pages?????

    Thakyou very much in advance!!!!!!!!!

  2. #2
    SikoSoft's Avatar
    SikoSoft is offline Freshman
    Join Date
    May 2010
    Location
    Sweden
    Posts
    13
    Thanks
    0
    Thanked 1 Time in 1 Post
    Feedback Score
    0

    Default

    Sorry I ended up on this site months after you posted this, but I figured I'd post the solution anyhow for anyone else who ends up on this page.

    In your .htaccess file (or better yet, your httpd.conf file if you have a dedicated server) add this line:

    DirectoryIndex index.php index.html index.htm

    Here index.php would take precedence, meaning if you have an index.php file and an index.html file on your server the index.php file would be used as the index page.

    Using this setting also means the files don't even need to be named "index" at all - you could call them "home.php" and use a line like:

    DirectoryIndex home.php index.php home.html index.html home.htm index.htm

    I think you get the idea!
    "Too much of everything is just enough." - The Grateful Dead
    www.sikosoft.com

  3. #3
    Anas is offline Freshman
    Join Date
    Dec 2009
    Location
    Pakistan
    Posts
    22
    Thanks
    24
    Thanked 0 Times in 0 Posts
    Feedback Score
    0

    Default

    thakyou friend ..... it really worked and solved the problem very well...

  4. #4
    jcourtenay's Avatar
    jcourtenay is offline Master
    Join Date
    Jan 2011
    Location
    Wirral, UK
    Posts
    4,616
    Thanks
    23
    Thanked 30 Times in 29 Posts
    Feedback Score
    0

    Default

    Just a suggestion, you could use this to SEO optimise your site i.e. set the index filename to my-site-topic.htm
    Free web space from Worlditsme, offering free web hosting packages and free php hosting

  5. #5
    Daws0n is offline Freshman
    Join Date
    Feb 2011
    Posts
    12
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Feedback Score
    0

    Default

    I would say the solution suggested by SikoSoft is simply great. he must be a system admin or something because a normal user can't even think of editing .htaccess or httpd.conf file at the very sight. i used to host my sites locally & had a similar problem, but at that time i was not lucky enough to read this thread so i ended up reinstalling WAMP to fix the issue.

Similar Threads

  1. Some great ways to increase your Page Rank
    By himoacs in forum Google
    Replies: 20
    Last Post: 05-14-2013, 09:19 AM
  2. Free Search Engine Submission Links
    By Nazia in forum All Other Search Engines
    Replies: 29
    Last Post: 05-13-2013, 02:37 AM
  3. Great Article:How to get indexed faster
    By krates98 in forum Directories
    Replies: 38
    Last Post: 04-15-2013, 02:35 AM
  4. All You Need To Know About SEO
    By articleenterprise in forum Search Engine Optimization
    Replies: 19
    Last Post: 04-13-2009, 02:14 AM
  5. 10 Myths About Google Page Rank
    By manik in forum Google
    Replies: 2
    Last Post: 06-26-2008, 02:07 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Partners: BOSTON WEB DEVELOPER, LLC   |   WEBCOSMO CLASSIFIEDS