I'm a beginner in PHP. And would need help in resolving the following issue.
This is the the original string
/hs/?page_id=27&file=filename.jpg
And i would like it to be replaced with the following.
/hs/wp-content/gallery/filename.jpg
And please note that the filename and id number are subjected to change everytime. So i guess use of wildcards could be a better choice to replace the characters between "?" and "=" .
How could this be accomplished with the use of reg_replace ? Or is there any other solution ?