title: Force trailing slash
body: <p>I'm trying to force a trailing slash to my URLs, but I can't make it work the way I want. This is my .htaccess file:</p>
  
  <pre><code>RewriteEngine on
  
  #Force trailing slash
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_URI} !index.php
  RewriteCond %{REQUEST_URI} !(.*)/$
  RewriteRule ^(.*)$ /$1/ [L,R=301] 
  
  #Subdomains
  RewriteCond %{HTTP_HOST} !^www\.example\.com [NC]
  RewriteCond %{HTTP_HOST} ^([^/.]+)\.example\.com$
  RewriteCond $1/%1 !^([^/]+)/\1$
  RewriteRule ^/([^/]+)? /%1%{REQUEST_URI} [L]
  
  #Point everything to page.php
  RewriteCond %{HTTP_HOST} !^www\.example\.com [NC]
  RewriteCond $1 !^(.*).(php|css|js|png|jpg|gif|htm|html)$
  RewriteRule ^(.*)$ page.php?q=$1 [L,NC]
  </code></pre>
  
  <p>If I go to "en.example.com/about" I'm redirected to "en.example.com/en/about/", which is an invalid page.</p>
  
  <p>How can I make this work?</p>