design_dolphin,
Thanks for the suggestion, but that’s not what I’m trying to achieve. What your link suggests merely provides a redirect page that says “We’re Upgrading. Come back soon!”
Let me try to be more clear about my needs:
The site in question is rather large. It will take me several days to move all the content in the existing static .shtml pages into the new WordPress site. During that time, I want the existing static HTML site to remain online and available to visitors.
In the past, when I have upgraded static HTML websites to any of a number of different PHP-based CMS, I can install the CMS in the root directory of the existing static site, and so long as I provide a DirectoryIndex index.htm line in the htaccess file, visitors to the site will continue to see the old site.
While those visitors are happily viewing the old site, I can type in the direct URL to the new CMS in development https://www.domain.tld/index.php and that will give me the homepage of the as-yet unfinished PHP-based CMS site because those CMS don’t strip the /index.php off the URL.
But, WordPress seems to want to strip the /index.php off of the URL and send me automatically to the domain.tld/. It is probably doing that for SEO reasons (I’m guessing they want to prevent search engines from seeing duplicate content for domain.tld/ and domain.tld/index.[htm|php|shtml|etc.] Unfortunately, as long as there is an index.htm file, the server is going to serve that index.htm page first, unless, as I said above, I force it to serve the index.php using the htaccess file … but that leads back to my original problem again: visitors seeing a partially finished WordPress site.
So, I know my way around a .htaccess file, but I can’t get around WordPress’ desire to strip the /index.php off the URL without so much as a “by your leave”.
I’ve searched the various core files for this URL truncating behavior, but I can’t seem to find the line. I thought maybe it was the ABSPATH setting on line 20 of the wp-load.php file …
/** Define ABSPATH as this files directory */
define( 'ABSPATH', dirname(__FILE__) . '/' );
I changed it to …
/** Define ABSPATH as this files directory */
define( 'ABSPATH', dirname(__FILE__) . '/index.php' );
… but that made no difference.
So, now, for the time being, I’m stumped.
I do know this … I seem to be the only person having this problem … and that usually means I’m missing something very basic … so please, keep the suggestions coming.