html priorities

D

don

Please explain the priorities of HTML files as it relates to which file a
server is going to display when you browse to a domain name. I had uploaded
a index.html file to a website but was never able to see it until tech
support told me that some file ending in .php had a higher priority. I
thought index.html was the first file that a browser would find if none was
specified.
 
M

MG

don said:
Please explain the priorities of HTML files as it relates to which file a
server is going to display when you browse to a domain name. I had
uploaded a index.html file to a website but was never able to see it until
tech support told me that some file ending in .php had a higher priority.
I thought index.html was the first file that a browser would find if none
was specified.

Ask in a group such as alt.apache.configuration

(These priorities can be set in .htaccess)

MG
 
S

Steve MacLellan

If you have a hosting account where you can add/edit .htaccess you can set
your directory indexes there:

DirectoryIndex index.html index.cgi index.php

Ths means when the directory loads it first looks for an index file with
the .html extension. If it doesn't find it, then it looks for a file named
index.cgi -- if it doesn't find it, it looks for a file named index.php.
 
L

Lewis

In message said:
Please explain the priorities of HTML files as it relates to which file a
server is going to display when you browse to a domain name. I had uploaded
a index.html file to a website but was never able to see it until tech
support told me that some file ending in .php had a higher priority. I
thought index.html was the first file that a browser would find if none was
specified.

This is a server configuration setting. You can prioritize any file you
want.
 
D

don

Evan Platt said:
I'm going out on a limb and guessing the OP uses a shared host / colo
of some sort, and doesn't have any control. So more precise, whoever
manages his server can prioritize any file they want :)

I an using a service by GoDaddy.com and I do not see that " httpd.conf
file " so maybe your right...... tech support just told me they would
remove this free web designing application and then I would be able to use
my index.html file as the default.

Now that I know better, I should have had the guy just edit the file instead
of removing the web application software.

Thanks for your help
 
B

Brian Cryer

don said:
Please explain the priorities of HTML files as it relates to which file a
server is going to display when you browse to a domain name. I had
uploaded a index.html file to a website but was never able to see it until
tech support told me that some file ending in .php had a higher priority.
I thought index.html was the first file that a browser would find if none
was specified.

Priorities don't matter much. So index.php *might* have a higher priority
than index.html but the priority only matters if you have both index.php and
index.html. If you only have one then it should get displayed.

That you didn't see index.html indicates to me not that its "priority" was
wrong but that it wasn't one of the default documents that you web server
displays. I'd suggest trying index.htm, default.htm or default.html.

Personally I would not use index.php unless you are using PHP. My
understanding is that index.php would be processed by PHP before being
rendered, so you are adding some overhead to the server that you don't
require for a plain HTML file.

Hope this helps.
 
W

William Gill

I an using a service by GoDaddy.com and I do not see that " httpd.conf
file " so maybe your right...... tech support just told me they would
remove this free web designing application and then I would be able to use
my index.html file as the default.

Now that I know better, I should have had the guy just edit the file instead
of removing the web application software.

Don't knee jerk to what you have been told or have observed.

As previously mentioned, this is a server issue, and the httpd.conf
won't be in your web-space since it controls the server used by everyone
on your host. Someone correctly mentioned this belongs in a server
config news group, and assumed Apache (a good bet, since Apache is the
dominant server used), but to be sure (since they have already verified
php is operational) copy the line of html below then save and upload it
as phpinfo.php when you access it via a
browser(http://www.example.com/phpinfo.php) it should give you (more
than) enough info to see exactly what httpd server they are using. From
there study that particular server(or ask in the appropriate group), and
study the .htaccess file (particularly for the DirectoryIndex command)
if the server actually is Apache.

<?php phpinfo(); ?>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,535
Members
45,007
Latest member
obedient dusk

Latest Threads

Top