title: RewriteRule conflict with folders
body: <p>In my page I have a login folder. When I enter into <em>domain.com/login/</em> it takes me correctly to the folder. When I write <em>domain.com/login</em> it also opens the page but the url changes into <em>domain.com/login/?cname=login</em></p>
  
  <p>My other main link is like <em>domain.com/company</em> and works correctly. However if i write <em>domain.com/company/</em> it sais object not found.</p>
  
  <p>How can I fix these?</p>
  
  <pre><code>RewriteEngine On
  RewriteCond %{REQUEST_URI} !^/$
  RewriteCond %{REQUEST_URI} !^/domain.com/index.(php|html?)
  # domain.com/login
  RewriteRule ^/login?$ /domain.com/login/index.php
  # domain.com/abc
  RewriteRule ^([a-z0-9]+)?$ /domain.com/profile/company-profile.php?cname=$1 [NC,L]
  </code></pre>