Jump to content

Change index file order (I want my site to read my .html file first, then .php


jamescalvin

Recommended Posts

Hey Freaks,

Hopefully this is a simple fix.  Right now, when someone goes to my site, they currently go to mysite.com/index.php but instead, I would like it to go to mysite.com/index.html but I have no clue how that's done.  Can someone help me out with this one?  I did a search, but I don't even know what that's called so I couldn't really find anything.

Thanks
Link to comment
Share on other sites

its an apache setting - it looks for files in a certain order - normally index.html index.htm index.php but your server clearly has index.php

You may be able to alter this in a .htaccess file (not sure what the flag u need is) other wise its asking your hosts to help out adn tell you haw to achive your goal.

You could always remove your index.php file or rename it index2.php - if you have coded robustly this should be easy to achieve and updateable for the rest of the site.
Link to comment
Share on other sites

Make a .htaccess file in the directory you want it to affect and put this line in it:

[code]DirectoryIndex index.html index.php[/code]

This will have it direct to index.html first, and index.php if index.html isn't found. Note that it will affect all subdirectories of the directory you place it in.
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.