Link Tools Dereferer Hide Referrer Link URL Shortener Affiliate Cloaker PayPal Links Privacy Tools Password Generator Cloudflare Resolver My Referrer Torrent Tools Magnet → Torrent Torrent → Magnet Torrent Editor Pirate Bay Proxies Movierulz Proxies ExtraTorrent Proxies Dev Tools Base64 Encoder Hash Generator HTTP Headers Disposable Email Checker Company Blog About Us Contact Anonymize Free
?>
Dev Tool

.htaccess Generator

Generate Apache .htaccess rules for redirects, security headers, HTTPS enforcement, caching and more.

🔒 HTTPS & WWW

🛡️ Security Headers

⚡ Performance & Caching

🚫 Block & Protect

🔗 Custom Redirects

Add custom 301 redirects (one per line):
Format: /old-url /new-url

📄 PHP Settings

🔧
Apache only
.htaccess files are supported by Apache web servers. Nginx uses server block configuration files instead.
💾
Backup first
Always backup your existing .htaccess before making changes. A syntax error can take your site offline.
Test your rules
After uploading, test all your pages — especially admin, login, and main pages — to confirm redirects work correctly.

Frequently Asked Questions

What is an .htaccess file?
.htaccess is a configuration file for Apache web servers. It allows you to modify server behaviour per-directory without editing the main server configuration. Common uses include URL redirects, HTTPS enforcement, security headers, and access control.
Does .htaccess work on Nginx?
No. Nginx does not support .htaccess files. Nginx uses server block configuration files (nginx.conf). If you are on Nginx, you need to add equivalent rules in your server configuration instead.
My site went offline after uploading .htaccess — what do I do?
A syntax error in .htaccess causes a 500 Internal Server Error. Connect via FTP/SFTP, rename .htaccess to .htaccess.bak to restore your site, then review the rules for errors before re-uploading.
Done!