Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
dear all,
I have webserver on linux,www.mydomain.com
i was using index.html my website,but now i have to use index.php
my problem is that if i use
www.mydomain.com/index.php
then it works ok but i dont wants to add index.php in the end of site name
In httpd.conf i have directory index directive is as follows
DirectoryIndex index.php index.html index.htm index.shtml
and also i have delete my index.html & there is only index.php file
what can i do to resolve this
thanks

I'm using Redhat 8 and tried your circumstances, but did not have any problem getting it to recognize index.php. Like you said, I modified "/etc/httpd/conf/httpd.conf" and changed the line "DirectoryIndex index.html index.html.var" to be "DirectoryIndex index.php index.html index.html.var". Then, I entered "service httpd restart" to restart apache. Then, I stuck the php file (index.php) in "/var/www/html". Now, when I enter my ip address in a browser ("http://10.10.10.1", for instance), I get the php file. I hope that helps. Otherwise, please provide more info as what you've stated (if you are putting the files in the correct place and changing the correct files and restarting the daemon), your setup should work, based upon the info given. Good luck.

Dear ribot & C_Leagend,
Thanks for help me,
I tried index.html which points to index.php
it was working fine except one problem when I uses back button then my homepage's java script not works.
Then I tried this in httpd.conf<IfModule mod_dir.c>
DirectoryIndex index.html index.php
</IfModule>Thats all & it is working fine now.
Well thanks for help again,Ravinder,

![]() |
![]() |
![]() |

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |