Code:
# Apache configuration file
# httpd.apache.org/docs/2.2/mod/quickreference.html
# ----------------------------------------------------------------------
# Webfont access
# ----------------------------------------------------------------------
# Allow access from all domains for webfonts.
# Alternatively you could only whitelist your
# subdomains like "sub.domain.com".
<FilesMatch "\.(ttf|otf|eot|woff|font.css)$">
<IfModule mod_headers.c>
Header set Access-Control-Allow-Origin "*"
</IfModule>
</FilesMatch>
[rant #4]The definition of an idiot is someone who repeatedly does the same thing expecting a different result. Asking Apache to confirm the existence of ANY module with an <IfModule> ... </IfModule> wrapper is the same thing in the webmaster world. DON'T BE AN IDIOT! If you don't know whether a module is enabled, run the test ONCE then REMOVE the wrapper as it is EXTREMELY wasteful of Apache's resources (and should NEVER be allowed on a shared server).
[/rant 4]
Compounding matters, you make several <IfModule> tests throughout your .htaccess and each one must be tested for every pass through your .htaccess (use a log level of 9 to see how many passes you make for each request).
If you have control over your server, move the <IfModule> and other core directives into the server's httpd.conf or httpd-vhosts.conf files where they'll be read ONCE. If you don't have server control, ask your host for help as it will ease the abuse of their server so they should be happy to help.
# ----------------------------------------------------------------------
# Proper MIME type for all files
# ----------------------------------------------------------------------
# Audio
AddType audio/ogg oga ogg
AddType audio/mp4 m4a
# Video
AddType video/ogg ogv
AddType video/mp4 mp4 m4v
AddType video/webm webm
# Proper svg serving. Required for svg webfonts on iPad
# twitter.com/FontSquirrel/status/14855840545
AddType image/svg+xml svg svgz
AddEncoding gzip svgz
# Webfonts
AddType application/vnd.ms-fontobject eot
AddType font/truetype ttf
AddType font/opentype otf
AddType application/x-font-woff woff
# Assorted types
AddType image/x-icon ico
AddType image/webp webp
AddType text/cache-manifest appcache manifest
AddType text/x-component htc
AddType application/x-chrome-extension crx
AddType application/x-xpinstall xpi
AddType application/octet-stream safariextz
AddType text/x-vcard vcf
# ----------------------------------------------------------------------
# ETag removal
# ----------------------------------------------------------------------
# FileETag None is not enough for every server.
<IfModule mod_headers.c>
Header unset ETag
</IfModule>
# Since we're sending far-future expires, we don't need ETags for
# static content.
# developer.yahoo.com/performance/rules.html#etags
FileETag None
Options +FollowSymLinks
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+)/$ /$1 [R=301,L]
RewriteCond %{SCRIPT_FILENAME} !-d
RewriteCond %{SCRIPT_FILENAME} !-f
Is this for u/{something}? Why did you use {SCRIPT_FILENAME}?
RewriteRule ^u/(.*)$ /profile.php?u=$1 [QSA,L]
RewriteRule ^c/(.*)$ /company.php?c=$1 [QSA,L]
RewriteRule ^blog/([0-9]+)/(.*)$ /blog.php?post_id=$1&title=$2 [R=301,L]
Good - but only use for your testing then remove!
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^\.]+)$ $1.php [NC,L]
1. I would have tested whether the .php extension IS a file rather than the current request not a file
2. No need to escape . in a character range definition
3. I would "reverse" the \ and exclude /
4. The No Case flag is intended for the case INsensitive {HTTP_HOST}, not {REQUEST_URI} which IS case sensitive. Besides, both cases (and the kitchen sink) are matched by your character range definition so this is useless here, anyway
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
RewriteRule ^(.*)$ http://%1/$1 [R=301,L]
I wouldn't have bothered Apache to copy the {REQUEST_URI} string again for the redirection and merely use RewriteRule .? http://%1%{REQUEST_URI} [R=301,L].
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.php\ HTTP/
RewriteRule ^index\.php$ http://pitchbig.com/ [R=301,L]
You were smart enough not to use the end anchor so why did you use the start anchor? The format of {THE_REQUEST} is "GET /index.html HTTP/1.1" and it looks like all you needed to match was the index.php ... which is exactly what the associated RewriteRule does.
RewriteRule (.*)\.xml(.*) $1.php$2 [nocase]
Possibly nothing before or after .xml? That doesn't make any sense (to me - just like the nocase).
ErrorDocument 404 /404.php
Okay, with all my comments about your coding, I didn't see anything before your blog rule which would prevent it from matching nor anything after which would redirect from blog.php.
Bookmarks