I just installed WordPress. I have a non WordPress splash page at [root folder]/index.html. I’d like to keep the splash page up while I work on skinning WordPress. When I try to access index.php (also in the root folder), it rewrites the url to index.html. I don’t see index.html in the url but the splash page is there and I never see WordPress.
I am able to access the WordPress admin without issue. Anyone know how I can access WordPress without making it go live?
Either use a plugin (like wp-maintenance-mode) or hardcode your .htaccess file to redirect to the splash page, and allow your own (or your team) IP address to ignore the redirect. Like this:
Regarding your doubt why index.html gets served from root, it is because it usually takes precedence over index.php. If you wanted to change that, you would have to change the DirectoryIndex.
EDIT: I thought it was obvious, but, for the sake of clarity: 127.0.0.1 should be changed to your public IP address. Also note that 302 is Temporary Redirect, which is what we want.
Try this.
I did not use
index.html
because because that file name has special significance to the server. The ‘307’ is a status code meaning temporary redirect. I assumed that the ‘administrator’ role needs access ๐I feel the easiest method of achieving this is editing the .htaccess file in the root web directory, and place this at the top:
That swaps the priority order in which Apache chooses which file to use.
This works perfectly. Add new plugin folder with this file as index.php.
From the support thread:
“To address the original question, you can turn off canonical redirection by putting this into your plugins directory รขยย”
This seemed to help a lot of people there, and might be a proper answer here as well.
Try this on your htaccess file:
This code means that apache will look for index.html first, and if it doesn’t exist then will look for index.php