How can I redirect all posts permalinks from .html
to /
in WordPress?
To be more clear, for example, a post URL like this:
http://example.com/%category%/%postname%.html
To be redirected to:
http://example.com/news/%postname%/.html
It's simple to redirect them one by one, but I need a rule to redirect all posts. My current .htaccess
setup is:
# 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