WordPress index.html vs index.php struggle

Usually when we make wordpress websites we don’t really want people to see the website in the making – so we create an index.html splash page with “under construction” or something of that sort and then we go back to tweaking index.php

Well for a while now (since wordpress 2.7) that’s not really possible because if you access www.mydomain.com it’ll in fact show the splash page, but when you go to www.mydomain.com/index.php it’ll also redirect itself to that splash index.html file.
All the other wordpress pages and permalinks work, but without the main page it’s kinda hard to edit now isn’t it?

I was searching for an answer for a LONG time and it turns out there is one.
http://core.trac.wordpress.org/changeset/9203 – here it is. If it’s all black magic to you or you’re just lazy (who isn’t?) I’ll simply tell you what to do :

Go to wp-includes folder on your server, find the canonical.php file and then find a line that goes something like that:

$redirect['path'] = preg_replace('|/index.php/*?$|', '/', $redirect['path']);

and replace it with

$redirect['path'] = preg_replace('|/index.php/$|', '/', $redirect['path']);

It’s just removing two characters but the result is a working splash page and a working index.php

Ain’t it just great?

Liked it? Please share!