473,815 Members | 3,088 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2453
Contact your host. It should recognize the index.php without having to type
it in. (It works for me!!!)

Shelly

<ku***@pobox.co m> wrote in message
news:11******** **************@ z14g2000cwz.goo glegroups.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
6331
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. Users typing hostname/phpstuff don't get anything because there is no index.htm there, only index.php. What can I put in an index.htm file that'll invoke the index.php file? Or is there a setting in the Apache 2.0 server I've overlooked? ...
3
6086
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
2247
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 I've had to do this. I would think this bug causes quite a lot of people to evaluate postgres and decide it has awful primary key performance! I love postgres, and hate to think that this could be happening.
64
6439
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 user sees is content in only one language at a time. He or she can then switch to another language and set this as the preferred language, but again he or she sees content in only this one other language. The question now is: How do I get search...
7
498
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 www.awardspace.com uses) a goDaddy server. Can anyone help me with this? Can it be done?
5
12931
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
2728
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 regards Marc
7
24608
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 of PHP. Apache version 1.3.37 PHP version 5.2.4 I'm currently searching for an upgrade to Apache.
2
15715
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 org.apache.catalina.core.StandardWrapperValve invoke SEVERE: Servlet.service() for servlet jsp threw exception java.lang.NullPointerException at org.apache.struts.taglib.TagUtils.pageURL(TagUtils .java:1070) at org.apache.struts.taglib.TagUtils.computeURLWithCh...
0
10408
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10427
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10143
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7687
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6897
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5570
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5710
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4358
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3030
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.