I’m trying to write a bit mod rewrite regex and getting stuck.
I want to parse the following url structure to give variables to my script:
dogs/staffordshire-brown-hampshire-32
(32 is the variable I want to pass)..
index.php?type=dogs&id=$matches[1]
I have this so far which doesn’t seem to work
dogs/([^-]*$)
Any ideas? Thanks
That will match the entire string after dogs if it doesn’t contain a hyphen. Try: