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

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • kurtk@pobox.com

    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.

  • Shelly

    #2
    Re: How do I get index.php to be automatcially recognized by Apache?

    Contact your host. It should recognize the index.php without having to type
    it in. (It works for me!!!)

    Shelly

    <kurtk@pobox.co m> wrote in message
    news:1120433183 .668230.209530@ z14g2000cwz.goo glegroups.com.. .[color=blue]
    >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.
    >[/color]


    Comment

    • Kurt Krueckeberg

      #3
      Re: How do I get index.php to be automatcially recognized by Apache?

      [color=blue]
      > Contact your host. It should recognize the index.php without having to
      > type
      > it in. (It works for me!!!)[/color]

      I am the host, so to speak. I have installed php5, Apache and mysql locally
      on my desktop machine.


      Comment

      • Michael Winter

        #4
        Re: How do I get index.php to be automatcially recognized by Apache?

        On 04/07/2005 00:26, kurtk@pobox.com wrote:
        [color=blue]
        > 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.[/color]

        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]
        [color=blue]
        > Is that an .htaccess change of some sort?[/color]

        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.

        Comment

        • Kurt Krueckeberg

          #5
          Re: How do I get index.php to be automatcially recognized by Apache?

          > You need to modify the configuration for the server. Find and open[color=blue]
          > 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][/color]

          Thanks a lot! I made the change and it works now.


          Comment

          Working...