ASP.Net MVC: How to add country code to all url
<h2>i have two requirement</h2>

<p>1st one is : my requirement is to add country code to all url. before my url look like</p>

<blockquote>
  <p>www.mysite.net/catalog.aspx</p>
  
  <p>www.mysite.net/product.aspx</p>
  
  <p>www.mysite.net/cart.aspx</p>
</blockquote>

<p>but now i have to write some code in global place which will inject 2 char country code in all url just reading cookie value. so my new url would look like</p>

<blockquote>
  <p>www.mysite.net/uk/catalog.aspx</p>
  
  <p>www.mysite.net/uk/product.aspx</p>
  
  <p>www.mysite.net/uk/cart.aspx</p>
</blockquote>

<p>so tell me what code i need to add in global area of web site which inject country code in url. </p>

<p>2nd one is : whe country code will be injected in the url in browser address bar then my all links in my all pages should have the same country code.</p>

<p>if possible discuss this with code example and hints. one guy told me to download and install the IIS URL Rewrite module but i do not know how IIS IIS URL Rewrite module can inject country code reading from country cookie. i guess i need to add some code for that.</p>

<p>can i solve it by url routing which is in asp.net mvc. looking for help.</p>

<p>thanks</p>