Forum Moderators: phranque

Message Too Old, No Replies

redirecting to .shtml for only one index file

         

J64sqs

3:36 am on Mar 24, 2004 (gmt 0)

10+ Year Member



I've just redirected my index page to a new index page called index.shtml via the following code in my .htaccess file.

<IfModule mod_dir.c>
DirectoryIndex index.shtml index.html
</IfModule>

But now I've noticed that my guestbook does not redirect like it used to. It used to be that when you click on mydomain.com/guestbook, it would take you directly to mydomain.com/guestbook/index.php. But now it takes you to a page titled "index of /guestbook" and then lists all the files in /guestbook. And so then you have to click on the right file to be brought to my guestbook.

Might this glitch have something to do with the command shown above? If so, how do I rewrite the command so it doesn't affect my guestbook?

jdMorgan

4:31 am on Mar 24, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



J64sqs,

With the code you posted, I think you've "un-defined" your index.php file, so just add it back in:


DirectoryIndex index.shtml index.html index.php

As long as there is no index.shtml or index.html in your guestbook directory, the server will find your index.php file and run it.

Jim

J64sqs

4:56 am on Mar 24, 2004 (gmt 0)

10+ Year Member



Thanks. That fixed it.