Guía .htaccess

Archivo de configuración APACHE, puedes ver mas en (httpd.apache.org/docs/2.2/mod/quickreference.html)

Son temas a tratar y algunos de fácil usabilidad, optimización de archivos, caché de servidor, redirects y más. espero les sirva.

[bash]
# Techniques in here adapted from all over, including:
# Kroc Camen: camendesign.com/.htaccess
# perishablepress.com/press/2006/01/10/stupid-htaccess-tricks/

# Force the latest IE version, in various cases when it may fall back to IE7 mode
# github.com/rails/rails/commit/123eb25#commitcomment-118920
# Use ChromeFrame if it’s installed for a better experience for the poor IE folk


BrowserMatch MSIE ie
Header set X-UA-Compatible “IE=Edge,chrome=1” env=ie


# Because X-UA-Compatible isn’t sent to non-IE (to save header bytes),
# We need to inform proxies that content changes based on UA
Header append Vary User-Agent
# Cache control is set only if mod_headers is enabled, so that’s unncessary to declare

# hacks.mozilla.org/2009/07/cross-site-xmlhttprequest-with-cors/
# Disabled. Uncomment to serve cross-domain ajax requests
#
# Header set Access-Control-Allow-Origin “*”
#

# allow access from all domains for webfonts
# alternatively you could only whitelist
# your subdomains like “sub.domain.com”



Header set Access-Control-Allow-Origin “*”

# video
AddType video/ogg ogg ogv
AddType video/mp4 mp4
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 font/woff woff

# assorted types
AddType image/vnd.microsoft.icon ico
AddType image/webp webp
AddType text/cache-manifest manifest
AddType text/x-component htc
AddType application/x-chrome-extension crx

# allow concatenation from within specific js and css files

# e.g. Inside of script.combined.js you could have
#
#
# and they would be included into this single file

# this is not in use in the boilerplate as it stands. you may
# choose to name your files in this way for this advantage
# or concatenate and minify them manually.
# Disabled by default.

#
# Options +Includes
# SetOutputFilter INCLUDES
#

# gzip compression.

# html, txt, css, js, json, xml, htc:
AddOutputFilterByType DEFLATE text/html text/plain text/css application/json
AddOutputFilterByType DEFLATE text/javascript application/javascript application/x-javascript
AddOutputFilterByType DEFLATE text/xml application/xml text/x-component

# webfonts and svg:

SetOutputFilter DEFLATE

# these are pretty far-future expires headers
# they assume you control versioning with cachebusting query params like
#