I want to rewrite an url from example.php?id=123 to example-123-hello-world
(where “hello-world” is some fake text)
I tried this:
RewriteRule ^example-(.*)-(.*)$ /example.php?id=$1
it works only if there are no “-” in hello world:
example-123-helloworld
Any ideas how to do this? thanks a lot! 🙂
Try this: