Hello fellow programmers,
I'm using apache and i need to rewrite URL of type:
/a/b/c/d/boundary/stuff*
to:
/boundary/a_b_c_d/stuff*
I need to rewrite the first Uri to the second format.
The number of elements before '/boundary' are variable and i want to replace all slashes('/') between elements by '_'
The boundary word is always the same.
I believe i need to do make two rules, one for slash replace and another to change boundary to the beginning of the URL:
The second rule i think is something like ^/(.*?)/\bboundary\b to /boundary/$1
Is it possible to achieve what i want ?!
How?!
Thank you.
EDIT
I want to match until first boundary word, it's possible to have a URL like
/a/b/c/d/boundary/boundary
EDIT
Gumbo thank you for your help
based on your rewrite rules i managed to create one.