Hi,
I know this is not a wordpress (wp) forum, but I'm using php regular expressions and I need help.
My site is basically a wp plugin that adds a specific search page, so I'm working on providing more SEO friendly urls.
I'm trying to match an url like this:
http://mysite.com/2-bedrooms/3-bathrooms/mycity/2.html
that means the user is looking for a house with 2 beds, 3 baths, placed on mycity and it is requesting the page 2.
The regex I'm using is:
http://mysite.com/(/(\w+)-bedrooms)*(/(\w+)-bathrooms)*(/(\w+)-city)*/\b([^.]+)\b/(\d+).html
but it's not working at all. I'm able to match the ulr withour the page, but when I add the "/2.html" for page 2, wp doesn't understand it and I get a error 404: page not found.
All I need is a regex to match with the above given url.
Please, give me some hints.
Thanks in advance