Toolbox
VN
Công cụ liên quan:
Tính Chmod
Tạo Văn Bản Pháp Lý & Scaffolding
Tiện Ích Crypto & Định Danh Cho Dev
Tra cứu HTTP & MIME
Hướng dẫn: Tạo .htaccess / nginx
Tạo .htaccess / nginx
VN
Tuỳ chọn
Bắt buộc HTTPS
Xử lý www
Giữ nguyên
Bỏ www
Bắt buộc www
Nén Gzip
Cache trình duyệt (tĩnh)
Tắt liệt kê thư mục
Redirect 301 (mỗi dòng 'từ đến')
/old-page /new-page /blog/1 https://example.com/blog/first
Cấu hình
Apache
Nginx
# Generated .htaccess RewriteEngine On # Force HTTPS RewriteCond %{HTTPS} off RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] # Remove www RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC] RewriteRule ^ https://%1%{REQUEST_URI} [L,R=301] # Custom redirects Redirect 301 /old-page /new-page Redirect 301 /blog/1 https://example.com/blog/first # Gzip compression <IfModule mod_deflate.c> AddOutputFilterByType DEFLATE text/html text/css application/javascript application/json image/svg+xml </IfModule> # Browser caching <IfModule mod_expires.c> ExpiresActive On ExpiresByType image/jpeg "access plus 1 year" ExpiresByType image/png "access plus 1 year" ExpiresByType text/css "access plus 1 month" ExpiresByType application/javascript "access plus 1 month" </IfModule> # Disable directory listing Options -Indexes
Đánh giá & bình luận
—
Chưa có đánh giá nào
5
4
3
2
1
Bạn thấy công cụ này thế nào?
Đăng nhập để viết bình luận.
Đăng nhập
No data
Chưa có bình luận nào