Home>

I was displaying it in index.php,
I want to create an empty file in index.html and hide it
I'm chrome only, but the page is blank and I can redirect

I couldn't redirect with different people or with different operating systems such as firefox (including myself).

What is the reason? .

If it is a cache, will it take a long time to be reflected? .

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^ index \ .php $-[L]
RewriteCond% {REQUEST_FILENAME}! -F
RewriteCond% {REQUEST_FILENAM}! -D
RewriteRule. /Index.html [L]
#RewriteRule. /Index.php [L]
</IfModule>
# END WordPress
  • Answer # 1

    REQUEST_FILENAMtypos and.matches one character, so
    Matches URLs likehttp://example.com/xx, but
    It will not match if the URL ishttp://example.com/.

    If you want everything exceptindex.phpto beindex.html,

    RewriteEngine On
    RewriteBase /
    RewriteRule ^ index \ .php $-[L]
    RewriteCond% {REQUEST_FILENAME}! -F
    RewriteCond% {REQUEST_FILENAME}! -D
    RewriteRule ^ /index.html [L]


    Is n’t it?

  • Answer # 2

    RewriteCond% {REQUEST_FILENAM}! -d

    Are you typo here first?

    Not related to questions, but Google Chrome and Mozilla Firefox are browsers, not OSs.

  • Answer # 3

    # ...
    #RewriteRule ^ index \ .php $-[L]
    RewriteRule ^ index \ .html $-[L]
    # ... abbreviated ...
    #RewriteCond% {REQUEST_FILENAM}! -D
    RewriteCond% {REQUEST_FILENAME}! -D
    # ... Omitted ...