Not work htaccess command

#1
Hi.

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>
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.
 

NiteWave

Administrator
#2
I did test on latest lsws 6.0.11, the rule works as expected.

are there any other rules in this .htaccess ?

you can move above rules on top of .htaccess, to see if it'll work
 
Top