title: How can distinguish subdomain and maindomain in the link rewrite in .htaccess?
body: <p>in the .htaccess file how can i do this???</p>
  
  <ol>
  <li><p>if user access by main domain the link will be: <br>
  domain.com/subdomain/category<br>
  domain.com/subdomain/news<br>
  domain.com/subdomain/about<br>
  domain.com/subdomain/product<br></p></li>
  <li><p>if user access by sub domain the link will be: <br>
  subdomain.domain.com/category<br>
  subdomain.domain.com/news<br>
  subdomain.domain.com/about<br>
  subdomain.domain.com/product<br></p></li>
  </ol>