How to cut off question mark in url with functions.php

4 weeks ago 26

I usage directive .htaccess

<IfModule mod_rewrite.c> RewriteCond %{QUERY_STRING} !^$ RewriteCond %{QUERY_STRING} !(^|&)appId= RewriteCond %{QUERY_STRING} !(^|&)q= RewriteRule ^(.+?)\.html$ https://%{HTTP_HOST}/$1.html? [L,R=301] </IfModule>

The occupation would beryllium solved if this RewriteCond %{QUERY_STRING} !^$ regenerate with this RewriteCond %{THE_REQUEST} \?

But this directive does not work connected the Litespeed server.

How to chopped (redirect) to a nexus without a question people via function.php?

example: if unfastened website.com/post-name.html? >>>redirect>>> website.com/post-name.html

Sorry for my English. Please assistance me.

Read Entire Article

Our Ventures