#Forçar uso do www
RewriteEngine on
#RewriteCond %{HTTP_HOST} ^(pvsys\.com\.br)(:80)? [NC]
#RewriteRule ^(.*) http://www.pvsys.com.br/$1 [R=301,L]
# Compressão de arquivos
AddOutputFilterByType DEFLATE text/html text/text text/plain text/xml text/css application/x-javascript application/javascript text/javascript application/xml application/xhtml+xml application/rss+xml
# Bloqueia acesso ao arquivo .htaccess
deny from all
# Página de erro personalida
ErrorDocument 400 /error/erro-400.html
ErrorDocument 404 /error/erro-404.html
ErrorDocument 500 /error/erro-500.html
Options -Indexes
# Nao expira arquivos estaticos
ExpiresActive On
ExpiresDefault "access plus 1 year"
# Forçar uso do charset utf-8
AddDefaultCharset UTF-8
# Bloquear request baseado no agent
SetEnvIfNoCase ^User-Agent$ .*(craftbot|download|extract|stripper|sucker|ninja|clshttp|webspider|leacher|collector|grabber|webpictures) HTTP_SAFE_BADBOT
SetEnvIfNoCase ^User-Agent$ .*(libwww-perl|aesop_com_spiderman) HTTP_SAFE_BADBOT
Deny from env=HTTP_SAFE_BADBOT
# Redireciona qualquer requisição para index.php
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^.*$ index.php [NC,L]