index.php

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 ...


Go Back   Usenet Forums > PHP Programming Forums > PHP Language

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 07-27-2006
Jerome
 
Posts: n/a
Default index.php

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?

Reply With Quote
  #2 (permalink)  
Old 07-27-2006
Jerry Stuckle
 
Posts: n/a
Default Re: index.php

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
==================
Reply With Quote
  #3 (permalink)  
Old 07-27-2006
Anonymous
 
Posts: n/a
Default Re: index.php

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
Reply With Quote
  #4 (permalink)  
Old 07-27-2006
Jerome
 
Posts: n/a
Default Re: index.php

What about for the other server, is there anything I can do about it?
I'm not a direct admin.

Reply With Quote
  #5 (permalink)  
Old 07-27-2006
Rik
 
Posts: n/a
Default Re: index.php

Jerome wrote:
> What about for the other server, is there anything I can do about it?
> I'm not a direct admin.



Unfortunately, not a thing.

Grtz,
--
Rik Wasmus


Reply With Quote
  #6 (permalink)  
Old 07-27-2006
Jerome
 
Posts: n/a
Default Re: index.php


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

Reply With Quote
  #7 (permalink)  
Old 07-27-2006
Steve
 
Posts: n/a
Default Re: index.php


> > > 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

Reply With Quote
  #8 (permalink)  
Old 07-27-2006
Steve
 
Posts: n/a
Default Re: index.php


> 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

Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 12:59 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0