0

i've this snippet, but it doesn't works. Obviously is that plus sign + tha must be escape ?

RewriteCond %{QUERY_STRING} ^orderby=position&controller=search&orderway=desc&search_query=t+max$
RewriteRule ^it/cerca$ http://www.wrs.sm/it/cerca?orderby=position&controller=search&orderway=desc&search_query=tmax? [R=301,L]

i want to redirect this url

http://www.wrs.sm/it/cerca?orderby=position&controller=search&orderway=desc&search_query=t+max

to this

http://www.wrs.sm/it/cerca?orderby=position&controller=search&orderway=desc&search_query=tmax

Thanks ;)

I found the solution, the correct rules are:

RewriteCond %{QUERY_STRING} ^orderby=position&controller=search&orderway=desc&search_query=t\+max$
RewriteRule ^it/cerca$ http://www.wrs.sm/it/cerca?orderby=position&controller=search&orderway=desc&search_query=tmax [R=301,L]
Michael Hampton
  • 247,473

1 Answers1

0
            RewriteCond %{REQUEST_URI} ^/it/cerca$
            RewriteCond %{QUERY_STRING} orderby=position&controller=search&orderway=desc&search_query=t+max
            RewriteRule (.*) http://www.wrs.sm/it/cerca?orderby=position&controller=search&orderway=desc&search_query=tmax [R,L]

This may be a good starting point.

cstamas
  • 6,747