English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

I have both index.html and index.php in the same folder on my website. How do I make my index.html as the default home page instead of index.php? My index.php keeps on overriding my index.html. Thanks in advance!

2006-09-11 14:32:25 · 7 answers · asked by dds502 4 in Computers & Internet Programming & Design

7 answers

If you use apache:
Change the order of files at the next lines in the file httpd.conf of the folder conf. To change order of default page


DirectoryIndex index.php index.php4 index.php3 index.cgi index.pl index.html index.htm index.shtml index.phtml

2006-09-12 06:25:01 · answer #1 · answered by Anonymous · 0 0

Put a php redirect in the very top of your index.php page

header( 'Location: http://www.yoursite.com/index.html' ) ;
?>

Now theres one problem everytime you need index.php shown it will redirect. So you'll probably have to use an if else or switch case

2006-09-11 21:48:23 · answer #2 · answered by Developer NC 3 · 0 0

Hello...

As Dan has mentioned, can you rename your index.php index2.php and name your index.html and call it (or copy the information) to a new index.php. Otherwise, more than likely, your webhosting provider might have a control panel that you can set this in. Give them a call and I am sure that they will be able to help you out.

Thanks
Luc
www.vst-voip.com

2006-09-11 21:46:42 · answer #3 · answered by VoIPToGo 1 · 1 0

If you are using Windows' Internet Information Services (IIS) then open IIS from control panel's administrative tools, navigate to the web site, right-click, hit properties, go to default document and select index.html.

If you are running Apache then go into Tomcat Administrator and do your thing (you can tell I'm more of a Microsoft developer... oooh just a wee bit!)

R

2006-09-11 21:48:29 · answer #4 · answered by Anonymous · 0 0

Well usually index.html would take precedence. Are you able to just go and switch the name to index2.php? Because that will stop it ;).

Dan

2006-09-11 21:33:46 · answer #5 · answered by Dan 2 · 1 0

That's a setting on the server that you may not have access to. I'd recommend renaming one of your index.* pages.

2006-09-11 21:44:06 · answer #6 · answered by IT Pro 6 · 1 0

why do u wanna make it defualt just set ti tto tht

2006-09-11 21:38:40 · answer #7 · answered by samantha.sss 3 · 0 0

fedest.com, questions and answers