Forum Moderators: phranque

Message Too Old, No Replies

.htaccess- How to make index.php and index.html work together?

.htaccess index.php index.html directoryindex

         

mquest

4:17 pm on Feb 7, 2011 (gmt 0)

10+ Year Member



Hello,

I'm trying to make my .htaccess work. My DirectoryIndex is index.html

I would like visitors to see index.html when they go to www.domain.com. I would also like index.php to work when visitors go to www.domain.com/index.php.

What it's happening is that visitors go to www.domain.com/index.php and they are redirected to www.domain.com so they see index.html . Is there a way to make www.domain.com/index.php to go to the index.php page instead of going to the root.

I tried RewriteCond %{THE_REQUEST} and RewriteCond %{REQUEST_URI} with no luck.

Thanks for your help! :)

g1smd

9:16 pm on Feb 7, 2011 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



There is another rule somewhere that is doing that redirect.

You must alter that rule.

You can't fix it by adding another redirect, otherwise you'll have an infinite loop.

mquest

9:24 pm on Feb 7, 2011 (gmt 0)

10+ Year Member



Thanks a lot, g1smd . It really helps! :)

jboy

9:26 pm on Feb 7, 2011 (gmt 0)

10+ Year Member



Maybe it's MultiViews? Try

Options -MultiViews

to see if that makes any difference.