Skip to content

Instantly share code, notes, and snippets.

@mspreij
Last active August 29, 2015 14:05
Show Gist options
  • Select an option

  • Save mspreij/15ab1bb128eae0423faf to your computer and use it in GitHub Desktop.

Select an option

Save mspreij/15ab1bb128eae0423faf to your computer and use it in GitHub Desktop.
What I want is for the first to be turned into the second..
/widget => /widget/index.php
/widget/ => /widget/index.php
/widget?act=list => /widget/index.php?act=list
/widget/?act=list => /widget/index.php?act=list
/widget/list => /widget/index.php?act=list
/widget/v2/?act=list => /widget/v2.php?act=list
/widget/v2/list => /widget/v2.php?act=list
v2 could also be v45, basically "v\d+"
Any additional query parameters should just be passed on.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment