#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2000
    Posts
    14
    Rep 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
  2. #2
  3. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2000
    Posts
    20
    Rep 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
  4. #3
  5. No Profile Picture
    freebsd
    Guest
    Devshed Newbie (0 - 499 posts)
    >>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.
  6. #4
  7. No Profile Picture
    Gödelian monster
    Devshed Regular (2000 - 2499 posts)

    Join Date
    Jul 1999
    Location
    Central Florida, USA
    Posts
    2,307
    Rep Power
    62
    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.
  8. #5
  9. No Profile Picture
    Dave Bryant
    Guest
    Devshed Newbie (0 - 499 posts)
    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.

    ------------------

Similar Threads

  1. Replies: 17
    Last Post: February 14th, 2004, 01:40 PM
  2. Get info from MySQL into php page?
    By Dr_DK in forum PHP Development
    Replies: 2
    Last Post: February 5th, 2004, 07:22 PM
  3. Make PHP bypass .htaccess
    By DatNigz2002 in forum PHP Development
    Replies: 2
    Last Post: February 4th, 2004, 12:27 PM
  4. .htaccess + mod_auth_mysql + php + custom login page
    By Seather in forum PHP Development
    Replies: 0
    Last Post: February 2nd, 2004, 09:15 PM
  5. Help using a database and php to update a scores page.
    By deathsythe in forum PHP Development
    Replies: 0
    Last Post: February 2nd, 2004, 02:48 PM

IMN logo majestic logo threadwatch logo seochat tools logo