A
A
Alexander2016-12-27 12:13:12
Apache HTTP Server
Alexander, 2016-12-27 12:13:12

htaccess. How to make a redirect with parameters?

Good afternoon!
Help. How to redirect from a page:

https://example.ru/index.php?_route_=main/&page=2

to the page:
https://example.ru/main/&page=2

In addition to the page parameter, the limit parameter can be passed, or it can be without parameters at all.
I just got it like this:
RewriteCond %{THE_REQUEST} \ /index\.php\?_route_=?([^&\ ]*)
RewriteRule ^ /%1? [L,R]

But parameters are not attached

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Viktor Taran, 2016-12-30
@shambler81

everything is simple
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