When you use the URL rewrite module in C# with mod_rewrite rules like www.domain.com/products/clothes
you can easy to get anything after www.domain.com by use below code
HttpContext context = HttpContext.Current; string value = context.Request.RawUrl;
and you can get it /products/clothes
.Using function Regex to Split that string
string[] url = Regex.Split(value, Regex.Escape("/"));
Categories:
C#
0 comments:
Post a Comment