Mod rewrite REMOTE admin IP address to show certain file

Here’s the deal. I’m installing WordPress to a new site, but I need to do maintenance and testing that only I can see and access. No visitors. No spiders. I currently have a countdown page showing, but I want it to still show even after I begin setting up the site.

I need the mod rewrite rules to show the wordpress index.PHP only to my static IP address, while showing the old, coming soon index.HTML page to everyone else. Here’s the default htaccess mod rewrite rules that wordpress currently employs:

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]



DirectoryIndex will allow you to use index.html for your counter and index.php for your WP setup.

DirectoryIndex index.html index.php whatever

DirectoryIndex will not eliminate the abuse of your <IfModule> wrapper nor the useless RewriteBase and RewriteRule with ^index.\.php which merely duplicates the !-f RewriteCond test.

Please have a look around here because these directions have been repeated many times. In fact, I believe I have a Standard Rant for the <IfModule>:

[standard rant #4][indent]The definition of an idiot is someone who repeatedly does the same thing expecting a different result. Asking Apache to confirm the existence of ANY module with an <IfModule> … </IfModule> wrapper is the same thing in the webmaster world. DON’T BE AN IDIOT! If you don’t know whether a module is enabled, run the test ONCE then REMOVE the wrapper as it is EXTREMELY wasteful of Apache’s resources (and should NEVER be allowed on a shared server).[/indent][/standard rant #4]

No, I’m not calling you (or anyone else) an idiot! I am just making the point that a real webmaster would KNOW what the code does that he/she is using. If that were the case, you would already have removed the nonsense that WP had to add to prevent disabling people’s websites who don’t even know that they don’t have mod_rewrite available - the mod_rewrite code would otherwise generate Error 500 pages, not their website pages.

OMG! My Standard Rant needs more “this is not a flame attack” explanation text than it’s saved in repetitive explanations!



Thanks for your help dklynn. I think that’ll work out.