Forum Moderators: open

Message Too Old, No Replies

Change Index.html To main.php?

         

DonCorleone

11:56 pm on Feb 5, 2006 (gmt 0)

10+ Year Member



Hello,

I have a script i am installing on one of my sites, and it has the need to rename index to main.

However my server is not telling browsers to open main instead od index, so users are left with a blank screen.

Any solutions available?

johnnie

11:59 pm on Feb 5, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You are not very specific... Which webserver do you use?

In case of apache, look up the <IfModule mod_dir.c> section of your httpd.conf. You can add main.php to the DirectoryIndex list presented there. That should do the trick.

encyclo

12:10 am on Feb 6, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Welcome to the forums DonCorleone!

If you don't have root access but you are running Apache, then you can change the default directory index file in .htaccess:

DirectoryIndex main.php index.php index.html index.htm

DrDoc

12:18 am on Feb 6, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You can also set up mod_rewrite to redirect index.html to main.php

DonCorleone

12:29 am on Feb 6, 2006 (gmt 0)

10+ Year Member



Thanks for the help.

Someeone else told me to rename it to home.php rather than main.php & that seemed to work.

But im still getting a lot more issues, but im sure this is the not the right section.

And to let you all know, i do have root access, on a VPS with linux, cpanel & whm.

DrDoc

12:44 am on Feb 6, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



So, renaming it to index.php would've worked too ...