Forum Moderators: phranque
[127.0.0.1...]
[127.0.0.1...]
here is my rule:
RewriteRule /([a-z-]+)-([^.]+)\-bed-breakfast.html$ /accomm_scripts/accomm_city_srch.php?city=$2&state_prov=$1 [N]
This third url wont work:
[127.0.0.1...]
Am I to believe my first part of the rule ([a-z-]+) means any lowercase character plus a hyphen? and then the second part ([^.])+ means any character? if so then why wont the third url work?
My two variables for a state_prov could be:
ontario or british-columbia
my two variables for city could be:
toronto or port-perry
Can I not just have a rule that says /([anything]+)-([anything]+)\-bed-breakfast.html...?
means "one or more characters NOT equal to a period." Since you've changed the "tail" of the pattern from what you posted earlier, you'll need to change that now.
Also "\-bed-" does not need the leading backslash.
See the regular-expressions tutorial cited in our forum charter [webmasterworld.com] for more info.
Jim
RewriteRule /([a-z-]+)
but that could be "ontario" or "british-columbia" but it could also be "ontario-port" which is where my problem lies...port is the first part of a $2 "city" Is the only thing I can do is this?
ontario/port-perry-bed-breakfast.html
british-columbia/whisler-bed-breakfast.html
meaning use a / to separate the "state_prov" from the "city"?
Thanks
Phil
Jim