Page 1 of 1

.htm before .php

PostPosted: 05. February 2006 19:58
by Killerfrog
Hello

In 1.5.0 .htm extension were opened before .php for the same name (example index.htm before index.php)

In 1.5.1 .php are opened before .htm . How can I make .htm to open before .php again?

Thx!

PostPosted: 06. February 2006 00:44
by tjthedj
i don't know exactly, but i know you can put a php redirect in the .php file and redirect it to the index.htm file u need

here is the redirect code
Code: Select all
<?php
// Redirect browser
header("Location: http://www.example.com/");

// stop executing this script
exit;
?>


the http://www.example.com/ can be changed to the location, also if u don't want to use the full address it should still work with, /index.htm or somethiing like that

also you can use the index.php file that is in the htdocs folder and change the code to go index.html (that's what i did)

PostPosted: 06. February 2006 00:48
by Killerfrog
well, thx but I want in fact :

index.htm loads really fast and simple page that say that website is loading cause server is slow and index.php is a page with a lot of infos to treat so I can't redirect index.php to index.php cause the order I need is index.htm that redirect to index.php!!!

PostPosted: 06. February 2006 00:48
by KingCrunch
"exit" is useless in this case.

@topic: httpd.conf, directive "DirectoryIndex". change the order of the files. The first entries will be tried at first.