I am writing a mod_rewrite redirect that essentially grabs all the different parameters from an old URL format and pass them all concatenated as one argument to the new url.
Eg.:
Old URL: /rss.php/searchtype/basic/yearfrom/PARAM1/colour/PARAM2/yearto/PARAM3/ .. and so on.
New URL: /search/keywords/PARAM1+PARAM2+PARAM3
So basically I need to be able to match the start of the string, but after that match the VALUE of any argueent passed and then append them to the end of the new URL with a space between them.
You want to extract the params, no problem.
But once they’re extracted, the problem is that you want to concatenate them without
yearfrom(and so on)…I don’t think this is possible, and what I’m pretty sure is not possible, is that you want to replace chars (replace
/by+).This is an answer even though it may disappoint you (sorry).