title: htaccess add trailing slash and force www with clean urls
body: <p>I'm using my htaccess file with mod_rewrite to create clean urls like this:</p>
  
  <pre><code>&lt;IfModule mod_rewrite.c&gt;
  RewriteEngine On
  RewriteBase /
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule . index.php [L]
  &lt;/IfModule&gt;
  </code></pre>
  
  <p>I would also like to force the site to have the 'www' subdomain and most importunately add a trailing slash if the url doesn't have one.  </p>
  
  <p>I am an absolute noob with mod_rewrite and I've tried accomplishing this on my own by combining other code I found on google (sad I know), but I always end up with a 500 error.  </p>
  
  <p>Here's the code I found for force www:</p>
  
  <pre><code>&lt;IfModule mod_rewrite.c&gt;
  Options +FollowSymLinks
  RewriteCond %{HTTP_HOST} ^www\.domain\.tld$ [NC]
  RewriteRule ^(.*)$ http://domain.tld/$1 [R=301,L]
  &lt;/IfModule&gt;
  </code></pre>
  
  <p>Thanks for your help. </p>