Results 1 to 5 of 5
  1. #1
    Join Date
    Oct 2003
    Posts
    257

    How to give priority to .htm over .php?

    When I type www.mydomain.com/folder it displays the PHP version of index (www.mydomain.com/folder/index.php) How to give priority to .htm files?

    I don't want a redirect from .php to .htm because I need to use the index.php file

  2. #2
    Join Date
    Oct 2004
    Location
    Kerala, India
    Posts
    4,750
    Add an .htaccess file with the following.

    DirectoryIndex index.htm
    This will make it the top priority.
    David | www.cliffsupport.com
    Affordable Server Management Solutions sales AT cliffsupport DOT com
    CliffWebManager | Access WHM from iPhone and Android

  3. #3
    Join Date
    Oct 2003
    Posts
    257
    After writing this post I figured out what to look for in Google.

    If anyone is interested in the solution:
    http://www.movalog.com/archives/dyna...s-the-htaccess

    Basically you have to add this to the .htaccess file

    <IfModule mod_rewrite.c>
    <IfModule mod_dir.c>
    DirectoryIndex index.htm index.php
    </IfModule>

  4. #4
    Join Date
    Oct 2003
    Posts
    257
    Quote Originally Posted by david510
    Add an .htaccess file with the following.

    DirectoryIndex index.htm
    This will make it the top priority.

    I just found the solution. Thanks anyway!

  5. #5
    Join Date
    Oct 2004
    Location
    Kerala, India
    Posts
    4,750
    Ahh great.
    Always it is google the best and fast way to find out things.
    David | www.cliffsupport.com
    Affordable Server Management Solutions sales AT cliffsupport DOT com
    CliffWebManager | Access WHM from iPhone and Android

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •