.htaccess

RewriteRule wordpress 5


These directives set the conditions for the following directive RewriteRule.
Those. by themselves they do not apply, after them there should be a directive on which they affect

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^index.php [L]


In particular !-f
requires the rule RewriteRule
applied only if the file does not correspond to the physically existing file, but !-d
— the request should not be applied if a physically existing folder is requested. So the rule in RewriteRule,
following these directives will apply only to virtual URL
for which there is no folder or file on the server disk.

.htaccess


There is a configuration file in the server directory

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

# END WordPress