Username (e.g. epiz_XXX) or Website URL

I have a rule that directs access to non-exist files to the root.
I don’t have index3.html on the server.

RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule . / [L,R=301]

Error Message

The behavior to access index3.html (non-exist file) is
This is wrong because the rule says to redirect it to /

All other urls to non-exist files are redirected correctly.

Why is index3.html so special?

Other Information

(other information and details relevant to your question)

Why don’t you just set ErrorDocument:

ErrorDocument 404 /

Yeah, this is simpler.

I think I know my issue.
The rule messed up is probably due to the cache.

I cleared the cache and then the behavior is correct.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.