The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.
|
 |
|
Dev Shed Forums
> Programming Languages
> PHP Development
|
make a php page my index page, how???
Discuss make a php page my index page, how??? in the PHP Development forum on Dev Shed. make a php page my index page, how??? PHP Development forum discussing coding practices, tips on PHP, and other PHP-related topics. PHP is an open source scripting language that has taken the web development industry by storm.
|
|
 |
|
|
|
|

Dev Shed Forums Sponsor:
|
|
|

June 5th, 2000, 10:51 PM
|
|
Junior Member
|
|
Join Date: May 2000
Posts: 14
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
Silly question, but you know how when you type www.something.com it opens up the index.html page in that direcory, how can I make it open up a php page instead?
Should I use a meta tag on my index.html page to take me to default.php and set the time to zero so people do not see the transition?
Another silly question, when I link you to a page you always see the www.something.com/pagename.html part.
What do I need to do so you don't see this, just the www.something.com part instead.
thanks
|

June 6th, 2000, 01:55 AM
|
|
Junior Member
|
|
Join Date: May 2000
Posts: 20
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
|
As far as the index.php3 as an index page goes, I assume that it's existence alone will default it as the folder index.. ?!? The presence of an index.html/htm page may take presidence however.
Correct me if I'm wrong...
Keeping the whole site under the root domain in the address bar requires the index be a frameset with all following pages loading in one of the frames.
------------------
---------
Lanny
dtm
|

June 6th, 2000, 05:56 AM
|
|
Guest
|
|
Posts: n/a
Time spent in forums:
Reputation Power:
|
|
|
>>Should I use a meta tag on my index.html page to take me to default.php
No. You should use htaccess if you are allowed to.
#http://www.something.com/.htaccess
DirectoryIndex index.html index.php3 default.php pagename.html
<Files ~ "^.ht">
Order deny,allow
Deny from all
</Files>
###########################################
Please note the order of DirectoryIndex makes difference. If index.html is found, it will be the default page to load first. If none of them is found, a directory listing will be shown. So be caution to put the appropriate file name to that line.
<Files ~ "^.ht"> is to hide any hidden file starting with ".ht" such as .htaccess or .htpasswd.
|

June 6th, 2000, 11:53 AM
|
|
Gödelian monster
|
|
Join Date: Jul 1999
Location: Central Florida, USA
|
|
|
The above applies if you are hosted by an ISP that supports PHP but has not configured their webserver correctly. Silly Question: have you just tried deleting the index.html file and then seeing if index.php works?
If you have access to the configuration of your own webserver, though, you should be able to set global settings so that index.php files will be indexed.
In Apache, just open the httpd.conf file and search for DirectoryIndex, then modify that line the same way you would in a .htaccess file.
I'm not familiar with the configuration for other webservers, but it should be similar, if not easier.
|

June 6th, 2000, 11:26 PM
|
|
Guest
|
|
Posts: n/a
Time spent in forums:
Reputation Power:
|
|
|
If your ISP is running Apache have them modify the httpd.conf file at this line
<BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">code:</font><HR><pre>
#
# DirectoryIndex: Name of the file or files to use as a pre-written HTML
# directory index. Separate multiple entries with spaces.
#
<IfModule mod_dir.c>
DirectoryIndex index.html index.htm index.php default.php default.html default.htm
</IfModule>
[/code]
The important part is that index.php (or whatever prefix you parse) is on the line after Directory Index....just as the other guy said. If your ISP runs NT they need to add this in the Internet Management Console for you domain.
------------------
|
Developer Shed Advertisers and Affiliates
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Rate This Thread |
Linear Mode
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|