title: htaccess pretty urls setup
body: <p>I'm using htaccess for the first time to make pretty urls for my website html files and 1 php file. I was just wondering if I would be able to get some advice on my htaccess file set up and if how I have it set up is a good way? I'd hate for my urls to not work in some situation because of what I have written. :(</p>
  
  <p>Example html file:</p>
  
  <pre><code>before:  http://www.domain.com/subdomain/htmlpage.html
  after:   http://www.domain.com/subdomain/htmlpage/
  </code></pre>
  
  <p>Single php file:</p>
  
  <pre><code>before:  http://www.domain.com/subdomain/phppage.php?p=1
  after:   http://www.domain.com/subdomain/phppage/1/
  </code></pre>
  
  <p>I have added in a rule to redirect index.html to index.php. I've also had to add 'base href' in the head of each file because I've used relative links.</p>
  
  <p>the htaccess file:</p>
  
  <pre><code>Options +FollowSymLinks
  RewriteEngine on
  RewriteRule ^index\.html?$ / [NC,R,L]
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteRule .*[^/]$ %{REQUEST_URI}/ [L,R=301]
  RewriteCond %{REQUEST_FILENAME}.html -f
  RewriteRule ^(.+)/$ $1.html [L]
  RewriteRule ^(.+)/([0-9]+)/?$ phppage.php?p=$1 [L]
  </code></pre>