Page 1 of 1

htaccess question

Posted: Tue Oct 23, 2007 7:08 pm
by holysjit
Hi,
When I create a new folder on my FTP, and I go to (for example) mywebsite.com/newinstalledscript it won't work.
I have to type /index.php. How can I solve this annoying problem?


Thanks

Posted: Tue Oct 23, 2007 7:34 pm
by chickens
At the top of .htaccess put in

Code: Select all

DirectoryIndex index.php
This should automatically bring up index.php when you load the domain.

Posted: Tue Oct 23, 2007 7:46 pm
by holysjit
I doesn't work. That line was already in the .htaccess file....

Posted: Tue Oct 23, 2007 8:04 pm
by chickens
Hrm, interesting...

Does the index.php file work anywhere else on the server? By this I mean in the root directory domain.com does index.php work by default?

Is the server running apache? If not htaccess will not work.

Mind sending me a link to the site so I can take a further look at it? A PM would be fine if the site is not ready for a link.

Posted: Tue Oct 23, 2007 8:09 pm
by holysjit
Hi,

When I delete the .htaccess it works, so its all about the .htacces file.
www.thejokersweblog.nl

Regards,
Holy Sj!t

Posted: Tue Oct 23, 2007 8:17 pm
by chickens
Have you tried commenting out DirectoryIndex in the htaccess? All you need to do is put a # in front of that line.

Posted: Tue Oct 23, 2007 8:23 pm
by holysjit
Have you tried commenting out DirectoryIndex in the htaccess? All you need to do is put a # in front of that line.
Oh yeah! Thanks, it works. But is this safe?

Posted: Tue Oct 23, 2007 8:45 pm
by chickens
Telling apache the directory index was just screwing it up; it happens. By commenting it out apache is still using that index.php file by default and should have no implication on the security of your server.