Hi.
Not work RewriteCond %{THE_REQUEST} \?
if link https://website.ru/post.html?
result https://website.ru/404.shtml
but should be https://website.ru/post.html
How to fix?
Sorry for my English.
Code:
<IfModule mod_rewrite.c>
RewriteCond %{THE_REQUEST} \?
RewriteCond %{QUERY_STRING} !(^|&)post_permalink=
RewriteCond %{QUERY_STRING} !(^|&)q=
RewriteRule ^(.+?)\.html$ https://%{HTTP_HOST}/$1.html? [L,R=301]
</IfModule>
<IfModule mod_rewrite.c>
RewriteRule ^(.+?)\.html(?!/amp/).+$ https://%{HTTP_HOST}/$1.html? [L,R=301]
</IfModule>
if link https://website.ru/post.html?
result https://website.ru/404.shtml
but should be https://website.ru/post.html
How to fix?
Sorry for my English.