TeamPhotoshop
Reviews, updates and in depth guides to your favourite mobile games - AppGamer.com
Forum Home Latest Posts Search Help Subscribe

PHP file names

Page: 1 Reply
Mar 21st 2002#36819 Report
Member since: Mar 21st 2002
Posts: 3
When using a PHP index page, shouldn't the file name simply be index.php??

I have tried this with a new site that I am building (my first PHP venture). The index page is simply index.php, but when I type the site address without using the index.php specifically, it gives me an error telling me that I am not authorized to view the page.

The page uses only a simple "include" tag, which I learned about through the article on "Automatic Web Design" here at Teamphotoshop.com :-)

The URL in question is http://northeastbass.com/2002

If you go there now, you will get to the index.php page automatically, simply because I am using an index.htm page with a "refresh" metatag to forward directly to index.php 1 second after the initial page loads.

Anybody have any input on this problem??

Thanks in advance!

p.s. The site is still very much under construction, so please don't critique it too harshly :D
Reply with Quote Reply
Mar 21st 2002#36825 Report
Member since: Mar 18th 2001
Posts: 1452
You need to edit your htaccess file to recognize *.php as an index page.

Add this line to it:

DirectoryIndex index.php index.html index.shtml

That will cover all of them, in case one is not found. It will look for .php first, if it's not found look for .html. etc.
Reply with Quote Reply
Mar 21st 2002#36828 Report
Member since: Mar 21st 2002
Posts: 3
Thanks for the help. I appreciate it... do you mind telling me where this file is located? I am assuming that it is on the web server, but I don't see one there when I look.

Is this something that I have to create and place there, and if so, exactly what should the file name be and exactly where should it be placed on the server?

Thanks again for answering all of my questions.
Reply with Quote Reply
Mar 21st 2002#36831 Report
Member since: Mar 18th 2001
Posts: 1452
It should be in the root directory. If it's not, just create a text file called .htaccess Yes, that's right, .htaccess.

Just paste that line and upload it to root. Should work. It might be there, and you just can't see it. You'll just overwrite it, which shouldn't hurt anything. I've rewritten and uploaded mine dozens of times.

If you need more help on understanding htaccess, just search Google for htaccess. Tons of sites should come up.
Reply with Quote Reply
Mar 21st 2002#36832 Report
Member since: Mar 21st 2002
Posts: 3
Thanks!!

It worked great :D
Reply with Quote Reply
Mar 21st 2002#36834 Report
Member since: Mar 18th 2001
Posts: 1452
Glad to help.
Reply with Quote Reply
Page: 1 Back to top
Please login or register above to post in this forum