Quantcast
Channel: All Forums
Viewing all articles
Browse latest Browse all 28058

asp.net url rewrite based on part of url?

$
0
0
Currently my urls look like this: www.mysite.com/venues// e.g. www.mysite.com/venues/342/myvenue it's quite easy creating a rewrite url for this by checking for the occurence of "venues" But for a NEW site I want my URLS to look like this: www.mysite.com/- 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? I already looked at this blog: http://weblogs.asp.net/owscott/archive/2010/04/20/url-parts-available-to-url-rewrite-rules.aspx which seems to cover my needs, but I have no idea how to use it. Could anyone provide me with a rewrite sample that accomplishes the above? Thanks!

Viewing all articles
Browse latest Browse all 28058

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>