best

Trình tạo .htaccessbest

Tạo các quy tắc Apache .htaccess cho redirects và bảo mật.

# 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 Trình tạo .htaccess

1

Chọn Loại Chuyển Hướng của Bạn

Chọn từ permanent (301), temporary (302), hoặc external redirects để bắt đầu tạo các quy tắc .htaccess của bạn

2

Nhập URL Redirect của Bạn

Nhập URL bạn muốn redirect từ đó và URL bạn muốn redirect tới

3

Thêm Security Rules

Lựa chọn từ nhiều tùy chọn bảo mật, bao gồm password protection, IP blocking và file type restrictions

4

Tạo và Tải xuống

Nhấp vào nút 'Generate' để tạo các quy tắc .htaccess tùy chỉnh của bạn, và tải chúng xuống dưới dạng tệp text

Câu Hỏi Thường Gặp

Công cụ liên quan