fhIwashitaModugnojt
New Member
urrently my urls look like this:
www.mysite.com/venues/<venueid>/<venuename>
e.g.
www.mysite.com/venues/342/myvenueit's quite easy creating a rewrite url for this by checking for the occurence of "venues"\[code\]<rule name="view venue"><match url="^venues/([0-9]+)?/??([a-zA-Z0-9-]+)?$" /><action type="Rewrite" url="locationdetails.aspx?id={R:1}" /></rule>\[/code\]But for a NEW site I want my URLS to look like this:
www.mysite.com/<venuename>-<venueid>
e.g.
www.mysite.com/myvenue-342 I though of creating rewrite rules that check on a number in the url and use that as the venue id, but that would cause an issue if the venue venuename and this friendlyurl would contain a number, e.g. "pier 39" would then become "pier-39-342", or is there a way to capture the last id in the friendly url (so the id after the last dash) and use that as the parameter for R:1?
www.mysite.com/venues/<venueid>/<venuename>
e.g.
www.mysite.com/venues/342/myvenueit's quite easy creating a rewrite url for this by checking for the occurence of "venues"\[code\]<rule name="view venue"><match url="^venues/([0-9]+)?/??([a-zA-Z0-9-]+)?$" /><action type="Rewrite" url="locationdetails.aspx?id={R:1}" /></rule>\[/code\]But for a NEW site I want my URLS to look like this:
www.mysite.com/<venuename>-<venueid>
e.g.
www.mysite.com/myvenue-342 I though of creating rewrite rules that check on a number in the url and use that as the venue id, but that would cause an issue if the venue venuename and this friendlyurl would contain a number, e.g. "pier 39" would then become "pier-39-342", or is there a way to capture the last id in the friendly url (so the id after the last dash) and use that as the parameter for R:1?