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

Making a php file the default page

Page: 1 Reply
Jul 25th 2001#9782 Report
Member since: Mar 18th 2001
Posts: 87
I just had my appendix removed so I have had a lot of free time. So I decided to try some php, its new to me.

Anyway I made a new site (visit here) and I have run into some weird things that Im hoping you guys can help me with.

1) Without an index.htm I get a directory listing, is there a way to make a .php file the default fiel to be loaded? Currently im using a redirect page, but that is kinda hoaky.

2) If you add anything to address, say www.violet-rain.com/index.php/whatever, the previous page loads but the links are broken. Is this an .htaccess problem? or a .php one?

Both problems were unexpected, so any help is appreciated.

Feel free to comment on the tiny site if you like ;)
Reply with Quote Reply
Jul 25th 2001#9785 Report
Member since: Mar 18th 2001
Posts: 1452
Try adding this to your htaccess file:

#AddType application/x-httpd-php .php
DirectoryIndex index.html index.php


And why are you trying to make a directory listing after the page\extension? :confused:

That's what's causing the images not to load. That makes index.php look like a directory, and the way you have your images, /images/whatever.gif, makes the server think /images/ is a directory below /index.php, so the links look like this:

www.violet-rain.com/index.php/images/banner2.jpg
Reply with Quote Reply
Jul 25th 2001#9845 Report
Member since: Mar 18th 2001
Posts: 87
I dont actualy want any directory listing. What Im trying to point out is that normally if an address has an extra non-existent dir on it ie. www.violet-rain.com/index.php/NONEXISTANTFILE, you would get a 404 error. What is happening is that Im not getting the 404, instead im getting a loaded page with no graphics. I hope im getting this accross accurately.

Thanks for the tip on the .htaccess, ill try that out as soon as i get a chance,
Reply with Quote Reply
Jul 25th 2001#9854 Report
Member since: Jun 30th 2001
Posts: 447
That's actually the PHP parser causing the behavior your experiencing. The part after the .php is being treated as a variable, but then again there's no query string. All I can say is, it's PHP because Apache would have thrown a 404.
Reply with Quote Reply
Jul 25th 2001#9859 Report
Member since: Mar 18th 2001
Posts: 1452
My bad, I misunderstood.
Reply with Quote Reply
Jul 26th 2001#9925 Report
Member since: Mar 18th 2001
Posts: 87
Hunk, that gives me somewhere to start at least, thanks

Mobile, no worries, Im not the best at descibing things or getting my point accross. :D
Reply with Quote Reply
Page: 1 Back to top
Please login or register above to post in this forum