Forum Moderators: phranque
http://mysite/post-one
http://mysite/post-one.html
# 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
<Files 403.shtml>
order allow,deny
allow from all
</Files>
[edited by: SaleF at 6:06 pm (utc) on May 4, 2012]
That's one line of code and it goes before the non-www to www redirect which is before the wordpress internal rewrite code.
The .html redirect should be first. The www redirect comes next. Any internal rewrite comes last.
Test for .html URL requests is ^(([^/]+/)*[^/.]+)\.html?$
Test for extensionless URL requests is ^(([^/]+/)*[^/.]+)$