Results 1 to 5 of 5
-
05-12-2010, 09:01 AM #1
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!!!!!!!!!
-
05-20-2010, 07:47 AM #2
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
-
05-20-2010, 09:12 AM #3
thakyou friend ..... it really worked and solved the problem very well...
-
01-30-2011, 04:44 PM #4
Just a suggestion, you could use this to SEO optimise your site i.e. set the index filename to my-site-topic.htm
-
08-25-2011, 06:31 AM #5
Freshman
- Join Date
- Feb 2011
- Posts
- 12
- Thanks
- 0
- Thanked 0 Times in 0 Posts
- Feedback Score
- 0
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
-
Some great ways to increase your Page Rank
By himoacs in forum GoogleReplies: 20Last Post: 05-14-2013, 09:19 AM -
Free Search Engine Submission Links
By Nazia in forum All Other Search EnginesReplies: 29Last Post: 05-13-2013, 02:37 AM -
Great Article:How to get indexed faster
By krates98 in forum DirectoriesReplies: 38Last Post: 04-15-2013, 02:35 AM -
All You Need To Know About SEO
By articleenterprise in forum Search Engine OptimizationReplies: 19Last Post: 04-13-2009, 02:14 AM -
10 Myths About Google Page Rank
By manik in forum GoogleReplies: 2Last Post: 06-26-2008, 02:07 AM




Reply With Quote

