I've got a whole load of requests coming in with the format:
- Code: Select all
www.foo.bar/this_is_the_page.php
but the filenames are actually in the format
- Code: Select all
www.foo.bar/this-is-the-page.php
So first question is how on earth I replace any and all instances of '_' with '-'
The second question is whether it's possible to trim the inbound
- Code: Select all
this_is_the_page
ie everything between the last / and the first . to a maximum of 25 characters?
I'm sure they've both got to be really simple questions if you're in the know, but they're driving me nuts!