index.html coming up instead of index.php

1 user found helpful
I had an existing website. I installed Concrete5 (5.4) to it. All is working. Except when I go to my site, it goes to my old index.html page. If I am in edit mode and I click "Return to Website," it takes me tohttp://www.my-site.com, but it is the index.html page NOT the index.php page. Now, if I enter index.php, it takes me to that page. I've temporarily fixed the problem by placing a meta-refresh in the <head> of the index.html page to redirect the page to index.php. However, I'd like a permanent solution. I have attempted to work through Apache Handlers, .htaccess, and I've not been able to find a solution yet. I hope someone here can help me. Thank you, in advance, for your help.
bishopdennis
View Replies: View Best Answer
Brainakazariua replied on at Best Answer Reply
Brainakazariua
It is most likely that the server is configured to use that order.
If you no longer use the index.html page then rename it to for example: index.html_old (this is the easies option)

another option is something like what you did but then in the .htaccess.
create a 301 redirect there.

Redirect 301 /index.html http://www.yoursite.com/index.php


a 301 works directly so you won't see it being redirected.

The best option however is to change it in your server configuration if you have acces to that. then rearange the order to make sure it accepts .php files before .html files
bishopdennis replied on at Reply
bishopdennis
This is great! It worked perfectly! Thank you so much!
forsooth replied on at Reply
forsooth
I'm having a very similar problem with 5.4.2 -- using localhost. I go to the Dashboard, then -- upon clicking "Return to Website," I end up with at the "Parent directory" page.

The \localhost\concrete5.4.2 folder does not contain (in my installation) an .htaccess file, and the only "index" file is `index.php.`

Any suggestions? Not sure what I'm doing wrong.
bishopdennis replied on at Reply
bishopdennis
The .htaccess file is not a Concrete5 file. You'll find it in your root directory.

An added note ... not sure if this is a solution, but I know my host changed the server configurations, and located the mysql server elsewhere, and for whatever reason, "localhost" won't work for me, I have to put in the ip address in place of "localhost".

I hope this helps.
forsooth replied on at Reply
forsooth
Thanks! Very helpful!