htaccess rewrite rule to add another parameter to

2019-09-05 13:28发布

My question is, How do I redirect my old query string urls to the new query string urls.

Examples below:

I have updated my query string in url like so

computerhelpwanted.com/jobs/?position=Oracle+Developer

to the following

computerhelpwanted.com/jobs/?occupation=Developer&position=Oracle+Developer

Sometimes the query string structure is like this with a - separating the words.

computerhelpwanted.com/jobs/?position=data-analyst

and on rare instances it is like this

computerhelpwanted.com/jobs/?position=tech-support+or+it-support+or+support-technician+or+support-tech

Most of the time it is the + separating the words. And in most cases the 11 occupations that can be selected will be on the end of the query string parameter like in the example for position=Oracle+Developer. Where Developer is the occupation.

Any help on this in mod rewrite and/or php I'd be very grateful.

0条回答
登录 后发表回答