The team behind OnlineTools4Free — building free, private browser tools.
Published Feb 4, 2026 · 6 min read · Reviewed by OnlineTools4Free
Guia .htaccess para Iniciantes: Redirecionamentos, Seguranca e Mais
O Que e o .htaccess?
O ficheiro .htaccess e um ficheiro de configuracao para servidores Apache. Permite controlar o comportamento do servidor sem tocar na configuracao principal.
Redirecionamentos URL
Redirecionamento 301: Redirect 301 /pagina-antiga /pagina-nova
Forcar HTTPS: RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
Cabecalhos de Seguranca
- X-Content-Type-Options: Impede MIME sniffing.
- X-Frame-Options: Bloqueia iframes. Protege contra clickjacking.
- Strict-Transport-Security: Forca HTTPS.
Cache do Navegador
Imagens: 1 ano. CSS/JS: 1 mes. HTML: algumas horas.
Protecao de Diretorios
Bloquear ficheiros sensiveis, desativar listagem com Options -Indexes.
Erros Frequentes
- Erro 500 (sintaxe incorreta), loops de redirecionamento, mod_rewrite nao ativado.
O nosso gerador .htaccess ajuda a criar configuracoes corretas.
.htaccess Generator
Generate Apache .htaccess rules for redirects, security headers, caching, and more.
OnlineTools4Free Team
The OnlineTools4Free Team
We are a small team of developers and designers building free, privacy-first browser tools. Every tool on this platform runs entirely in your browser — your files never leave your device.
