best

Generator .htaccess β€” best

Buat aturan Apache .htaccess untuk redirects dan security.

# Generated by ToolHQ .htaccess Generator
Options -Indexes

<IfModule mod_rewrite.c>
  RewriteEngine On
  RewriteBase /

  # Force HTTPS
  RewriteCond %{HTTPS} off
  RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
</IfModule>

# Enable Gzip compression
<IfModule mod_deflate.c>
  AddOutputFilterByType DEFLATE text/html text/css application/javascript
</IfModule>

# Browser caching
<IfModule mod_expires.c>
  ExpiresActive On
  ExpiresByType image/jpeg "access plus 1 year"
  ExpiresByType text/css "access plus 1 month"
  ExpiresByType application/javascript "access plus 1 month"
</IfModule>

How to use Generator .htaccess

1

Pilih Jenis Redirect Anda

Pilih dari permanent (301), temporary (302), atau external redirects untuk mulai membuat rules .htaccess Anda

2

Masukkan URL Redirect Anda

Masukkan URL yang ingin Anda redirect dari dan URL yang ingin Anda redirect ke

3

Tambahkan Security Rules

Pilih dari berbagai opsi keamanan, termasuk password protection, IP blocking, dan file type restrictions

4

Buat dan Unduh

Klik tombol 'Generate' untuk membuat custom .htaccess rules Anda, dan download sebagai file text

Pertanyaan yang Sering Diajukan

Alat Terkait