Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cut get request htaccess

I need to redirect from the 1.html?somerequest url to 2.html (w/o request)

Here is my rewrite rule :

RewriteRule ^katalog/category/product/41-category/7865-productname.html?(.*)$ /katalog/category/product/41-category/7865.html [R=301,L]

but it redirecting me to 7865.html?request

Help me, please. Thanks.

like image 315
Alexey Berezuev Avatar asked Nov 28 '25 17:11

Alexey Berezuev


1 Answers

Change the rule to

RewriteRule ^(.*)/7865-productname.html$ $1/7865.html? [R=301,NC,L]
like image 168
Ravi K Thapliyal Avatar answered Dec 01 '25 06:12

Ravi K Thapliyal



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!