What I would like to do is rewrite URL's in a source, like this:
"index.php?ext=admin&plugin=askin&skinid=1&"
to
"index.php/ext_admin/plugin_askin/skinid_1.html"
or
"index.php?ext=admin&plugin=askin&skinid=1"
to
"index.php/ext_admin/plugin_askin/skinid_1/"
With these examples there can be any path behind index.php like /index.php, /forums/index.php, etc... And the link has to be either wrapped in double quotes or single quotes. If the link ends in & the end produces .html.
How would I do this using Regex? I've been messing around with it for nearly 3 or 4 hours, not to mention immense googling, and I cant seem to produce the correct result.