I'd like to use Apache's mod_rewrite in order to treat all dash breaks within a file name as separate folders starting from the top, or vice versa.
For example, if someone was to access /events/booking/?id=1
the file events-booking.php?id=1
would actually be requested.
The current sceript I have is taken from the StackOverflow post below, which simply strips the file of it's extension, but I'd like the addition of the above too.
https://stackoverflow.com/a/1698807/2023781
Any help on how to modify my existing block of mod_rewrite script would be greatly appreciated (I'm not really good with regex yet unfortunately).