473,322 Members | 1,259 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

How do I get index.php to be automatcially recognized by Apache?

I have install Apache and php5. I can execute php with no problem.
However, I would like index.php to be recognized and executed the way
that index.html is. That is, I want to be able to type
www.mysite.com in the browser and not have to always type
www.mysite.com/index.php.

Is that an .htaccess change of some sort? I not an Apache expert.

Jul 17 '05 #1
4 2427
Contact your host. It should recognize the index.php without having to type
it in. (It works for me!!!)

Shelly

<ku***@pobox.com> wrote in message
news:11**********************@z14g2000cwz.googlegr oups.com...
I have install Apache and php5. I can execute php with no problem.
However, I would like index.php to be recognized and executed the way
that index.html is. That is, I want to be able to type
www.mysite.com in the browser and not have to always type
www.mysite.com/index.php.

Is that an .htaccess change of some sort? I not an Apache expert.

Jul 17 '05 #2
Contact your host. It should recognize the index.php without having to
type
it in. (It works for me!!!)


I am the host, so to speak. I have installed php5, Apache and mysql locally
on my desktop machine.
Jul 17 '05 #3
On 04/07/2005 00:26, ku***@pobox.com wrote:
I have install Apache and php5. I can execute php with no problem.
However, I would like index.php to be recognized and executed the way
that index.html is.
You need to modify the configuration for the server. Find and open
httpd.conf in your favourite text editor and search for the
DirectoryIndex directive. It should look something like:

DirectoryIndex index.html index.html.var

You will need to modify that directive to include index.php. For example:

DirectoryIndex index.php index.html index.html.var

This means that if a request is made without a filename, the server will
first search for index.php, then index.html, and finally index.html.var.

[snip]
Is that an .htaccess change of some sort?


The DirectoryIndex directive can be set in a .htaccess file if really
necessary. However, if this is a local installation of Apache (for
testing, perhaps), then you may as well modify the server-wide settings.

Mike

--
Michael Winter
Prefix subject with [News] before replying by e-mail.
Jul 17 '05 #4
> You need to modify the configuration for the server. Find and open
httpd.conf in your favourite text editor and search for the DirectoryIndex
directive. It should look something like:

DirectoryIndex index.html index.html.var

You will need to modify that directive to include index.php. For example:

DirectoryIndex index.php index.html index.html.var

This means that if a request is made without a filename, the server will
first search for index.php, then index.html, and finally index.html.var.

[snip]


Thanks a lot! I made the change and it works now.
Jul 17 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Lab309 | last post by:
The problem I'm trying to solve is as follows: The website has two subdirectories: /ordinary and /phpstuff. Users typing hostname/ordinary get the file index.htm by default, and this works fine. ...
3
by: Jofio | last post by:
Hello, I am a newbie in PHP and I am enthusiastically trying out things. I've just replaced my index.html ( file with index.php
14
by: Craig O'Shannessy | last post by:
Hi all, Just thought I'd mention that I really think this problem needs to be fixed. I I'm patching the 7.4RC1 JDBC drivers as we speak due to this optimiser bug, and it's the third time...
64
by: Manfred Kooistra | last post by:
I am building a website with identical content in four different languages. On a first visit, the search engine determines the language of the content by the IP address of the visitor. What the...
7
by: Jerome | last post by:
How can I get a server to show index.php as it would index.html? When I save index.php it just shows the directory, I'm administrator of an Apache Server and I'm not of a (I think, it's what...
5
by: greenflame | last post by:
hello all, I have installed apache and php following the instructions on this link which was very helpful: http://www.tanguay.at/installPhp5.php5 problem: OS: Windows XP
11
by: monomaniac21 | last post by:
Hi all Ive just installed php 5 on my Apache server and its not recognizing my code when its written between <? ?only <?php ?will work. How can i edit the httpd.conf file to allow this? Kind...
7
by: JC | last post by:
Undefined index: HTTP_HOST This occurs sometimes, is there a reliable method for determining the HTTP_HOST. Not sure if this is something related to Apache or if it's a problem with the version...
2
by: ramprakashjava | last post by:
sorry still that error exist , how to avoid this deprecated method overriding in my netbeans ! In Bundled tomcat log it shows Dec 30, 2009 9:03:45 PM...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.