htaccess redirects and WordPress

The standard WordPress .htaccess file will do this for you if you select one of the “pretty permalinks” in the Settings / Permalinks page, like the “posts” option.

    # 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

I can’t seem to get that to format properly, so check the source page here –
https://codex.wordpress.org/htaccess

For more info, see the Codex page – https://codex.wordpress.org/Using_Permalinks#mod_rewrite:_.22Pretty_Permalinks.22