# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^(wp-admin)($|/) - [L] # You don't want to mess with WordPress
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\404.html-f
RewriteRule .* $0.php
# browser requests PHP
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /([^\ ]+)\404.html
RewriteRule ^/?(.*)\404.html$ /$1 [L,R=301]
# check to see if the request is for a PHP file:
RewriteCond %{REQUEST_FILENAME}\404.html -f
RewriteRule ^/?(.*)$ /$1404.html [L]
</IfModule>
# END WordPress