Forums

DirectoryIndex not working (2 posts)

  1. mr_prateekjain
    Member
    Posted 2 years ago #

    demo.localhost/blogs not working as i have to specify each time demo.localhost/blogs/index.php.
    Is there any way to set this DirectoryIndex somewhere.??

  2. MichaelH
    Volunteer
    Posted 2 years ago #

    Solution 1
    If allowed by your host, putting this in an .htaccess file will solve the problem:
    DirectoryIndex index.html index.htm index.php

    Solution 2
    Some hosts allow you to make a change, via their hosting control panel, to the DirectoryIndex. It's typically described as Indexes or Index documents, but may also require you to type something like
    DirectoryIndex index.html index.htm index.php
    or specify index.php as an index type file.

    Solution 3
    Instruct Apache to treat index.php as an index file. If you own the server, or have access to the http.conf file, simply modify the DirectoryIndex line in httpd.conf to:
    DirectoryIndex index.html index.htm index.php

    Solution 4
    Contact your host

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.