hacks .htaccess

Especifique o índice do diretório:

DirectoryIndex newindex.html

Especifique o erro 404:

ErrorDocument 404 /404error.html

Redirecionar 301

Redirect 301 /old.html /new.html

Resolva www (faça www.website.com se tornar website.com)

RewriteEngine On RewriteCond %{HTTP_HOST} ^www.website.com [nocase] RewriteRule ^(.*) http://website.com/$1 [last,redirect=301

Negar acesso a ip específico (123.45.6.6)

order allow,deny deny from 123.45.6.6 allow from all

Impedir Hot linking

RewriteEngine on RewriteCond %{HTTP_REFERER} !^$ RewriteCond %{HTTP_REFERER} !^http://(www.)?website.com/.*$ [NC] RewriteRule .(gif|jpg|css)$ - [F]

Faça website.com/index.html redirecionar para website.com (SEO Remover página de índice duplicada)

RewriteEngine on # For index.html and index.htm only, without parameters, and only in the root: RewriteCond %{THE_REQUEST} ^[A-Z]{3,9} /index.html? HTTP/ RewriteRule ^index.html?$ http://website.com/$1 [R=301,L]

Redirecionar uma pasta pode ser o mesmo site ou um site diferente

RewriteRule ^sma/delicias(.*)$ http://canbeanothersite.com/delicias$1 [L,R=301]