R
R
RKun2019-05-25 19:14:52
htaccess
RKun, 2019-05-25 19:14:52

How to set up a GET redirect with saving the URL in .htaccess?

There are two GET requests ?view=grid or list and ?per_page=number per page Can you
please tell me how to make a redirect from pages that have one or two specified GET requests at the same time, while preserving the URL itself?
Thank you!

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
dodo512, 2019-05-25
@RKun

RewriteCond %{QUERY_STRING} ^(view|per_page)
RewriteRule ^(.*)$ /$1? [R=301,L]

V
Viktor Taran, 2019-05-25
@shambler81

https://donatstudios.com/RewriteRule_Generator

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question