I need help redirecting in .htaccess
from:
/boys-shoes-c-23_24.html?page=2&sort=2a
/boys-shoes-c-23_24.html?page=2&sort=4a
to:
http://mysite.com/boys-shoes-c-23_24.html
and
from:
/swaddle-designs-c-27_77_14.html?page=2&sort=4a
to:
http://mysite.com/swaddle-designs-c-27_77_14.html
- the "-c-" is in all urls
- the text before and the numbers after the "-c-" are the same in the from: and to:, but there are many of these different instances
- "?page=...." anything after .html is what I want to eliminate and redirect to the url without these extra characters
I am no expert, but tried putting the part before and after the "-c-" in variables as:
^(.*)-c-(.*).html\?(.*)
http://mysite.com/$1&%-c-$2&%.html
but did not work, sure something wrong in the writing.
There must be a way to do this in 1 line of mod_rewrite.
Any help is appreciated