Redirect index.html to index.php

ساخت وبلاگ
I have never edited a .htaccess page before, but I would like to add a redirect from my old index.html to my new index.php page.

I have added a redirect in HTML, but even though I made the redirect time 0-seconds, the redirect is still taking about 1-second. (The time is not a big concern, but it does flash a blank white page for that second, and I would prefer it didn't do that).

After reading some different information on the internet it looks like I should be adding this to the first line of my .htaccess
Code:

RewriteEngine on
RewriteRule index.html index.php [NC,R,L]

I made this change, but it did not affect anything. I called my hosting service and confirmed which .htaccess file I should change, and they confirmed that it is the one in the public_html folder.

Questions:
1. Do I need to delete the index.html file for this to work properly? I would have thought that the above code would not even execute the index.html file?
2. Am I making this change in the correct area? (The .htaccess file under the public_html folder).
3. Is there different code that I should be using?
4. Will making this change, affect my rankings on web search engines? (If I skip the .htaccess redirect, and just rely on the html redirect, will this also affect my rankings on search engines?)

Thank you.
CodingForums...
ما را در سایت CodingForums دنبال می کنید

برچسب : نویسنده : codingforums بازدید : 450 تاريخ : سه شنبه 6 شهريور 1397 ساعت: 7:47