Add This to .htaccess to speed things up

Enable Gzip and browser caching code.  Add to the bottom of the .htaccess

# LBROWSERCSTART Browser Caching
<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType image/gif "access 1 year"
ExpiresByType image/jpg "access 1 year"
ExpiresByType image/jpeg "access 1 year"
ExpiresByType image/png "access 1 year"
ExpiresByType image/x-icon "access 1 year"
ExpiresByType text/css "access 1 month"
ExpiresByType text/javascript "access 1 month"
ExpiresByType text/html "access 1 month"
ExpiresByType application/javascript "access 1 month"
ExpiresByType application/x-javascript "access 1 month"
ExpiresByType application/xhtml-xml "access 1 month"
ExpiresByType application/pdf "access 1 month"
ExpiresByType application/x-shockwave-flash "access 1 month"
ExpiresDefault "access 1 month"
</IfModule>
# END Caching LBROWSERCEND


# START GZIP ENABLING #
<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/x-javascript
</IfModule>
# END GZIP ENABLING #

A Good .htaccess File

I’m a bit new to this side of things but for now this is the .htaccess file I’m using when I want everything to point back to http://www.site.com/

EDIT: I updated on 5/20/13 and 8/15/13 to add several options that can be removed.

RewriteEngine on

# Proper 404
ErrorDocument 404 /404.php
# 301 Redirects of old page names
RedirectPermanent /old-page.php http://www.site.com/new-page.php

# Force index.php to go to root
RewriteCond %{THE_REQUEST} ^.*/index.php 
RewriteRule ^(.*)index.php$ http://www.site.com/$1 [R=301,L] 

# Force www
RewriteCond %{HTTP_HOST} !^www.site.com$
RewriteRule ^(.*)$ http://www.site.com/$1 [R=301]

# Allow with or without PHP extension
RewriteEngine On
RewriteCond %{SCRIPT_FILENAME} !-d
RewriteRule ^([^\.]+)$ $1.php [NC,L]

# Force trailing slash
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !(\.[a-zA-Z0-9]{1,5}|/)$
RewriteRule (.*)$ http://www.site.com/$1/ [R=301,L]

Also I should have figured this out years ago but I shouldn’t just reference index.php and the like in an href, do it up right with the full URL http://www.site.com/