0

i'd like to remove question mark and value at the end of a url ending with amp.

For example, i want the following url:

http://www.domain.com/category/page.html/amp?value=12

to be like this:

http://www.domain.com/category/page.html/amp

What is the right way to do it using htaccess? Thank you.

0
RewriteEngine On
RewriteCond %{QUERY_STRING}  .
RewriteRule (.*) /$1? [R=301,L]

You could test it e.g. here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.