This is a discussion on index.php within the PHP Language forums, part of the PHP Programming Forums category; How can I get a server to show index.php as it would index.html? When I save index.php ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
How can I get a server to show index.php as it would index.html? When I
save index.php it just shows the directory, I'm administrator of an Apache Server and I'm not of a (I think, it's what www.awardspace.com uses) a goDaddy server. Can anyone help me with this? Can it be done? |
|
|||
|
Jerome wrote:
> How can I get a server to show index.php as it would index.html? When I > save index.php it just shows the directory, I'm administrator of an > Apache Server and I'm not of a (I think, it's what www.awardspace.com > uses) a goDaddy server. Can anyone help me with this? Can it be done? > Ask in alt.apache.configuration, maybe? -- ================== Remove the "x" from my email address Jerry Stuckle JDS Computer Training Corp. jstucklex@attglobal.net ================== |
|
|||
|
Jerome wrote:
> > How can I get a server to show index.php as it would index.html? When I > save index.php it just shows the directory, I'm administrator of an > Apache Server and I'm not of a (I think, it's what www.awardspace.com > uses) a goDaddy server. Can anyone help me with this? Can it be done? That's easy. Find your Apache config directory, edit the file httpd.conf and look for DirectoryIndex. It will look like this: # # DirectoryIndex: sets the file that Apache will serve if a directory # is requested. # # The index.html.var file (a type-map) is used to deliver content- # negotiated documents. The MultiViews Option can be used for the # same purpose, but it is much slower. # DirectoryIndex index.html index.html.var Just change the last line to: DirectoryIndex index.html index.php index.html.var |
|
|||
|
David Gillen wrote: > An noise sounding like Jerome said: > > What about for the other server, is there anything I can do about it? > > I'm not a direct admin. > > > You may be able to put a .htaccess file in the directory in question it's > directives will over rules the httpd.conf ones, assuming htaccess is enabled > on the server. Not always the case. > > D. I do believe it is, I'll check |
|
|||
|
> > > What about for the other server, is there anything I can do about it? > > > I'm not a direct admin. Alternatively you can add this meta tag (probably still works in most browsers): <meta content="0; url=index.php" http-equiv="refresh"></meta> --- Steve |
|
|||
|
> Alternatively you can add this meta tag (probably still works in most > browsers): > > <meta content="0; url=index.php" http-equiv="refresh"></meta> I should make it clear: in the event that you have no admin access or ..htaccess, you add this tag to your index.html source to cause browsers to redirect automatically. --- Steve |