コアルーティング & セキュリティ設定
.htaccess 設定出力
# ========================================================
# Apache .htaccess Configuration
# Generated by MiniToolDesk (100% Client-Side)
# ========================================================
RewriteEngine On
# Force HTTPS Redirection
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
# Redirect www to non-www
RewriteCond %{HTTP_HOST} ^www\.(.+) [NC]
RewriteRule ^(.*)$ https://%1%{REQUEST_URI} [L,R=301]
# Disable Directory Browsing
Options -Indexes
# Custom 404 Error Page
ErrorDocument 404 /404.html
# Enable Gzip / Brotli Compression
<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css text/javascript application/javascript application/json
</IfModule>
# Leverage Browser Caching (Expires Headers)
<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType image/jpg "access plus 1 year"
ExpiresByType image/png "access plus 1 year"
ExpiresByType image/svg+xml "access plus 1 year"
ExpiresByType text/css "access plus 1 month"
ExpiresByType application/javascript "access plus 1 month"
</IfModule>
ブラウザのサイドパネルにこのツールを固定
タブを切り替えずに Alt+M でいつでも即座に呼び出し可能。完全オフライン・無料。
.htaccessの作成手順
- 1リダイレクトやセキュリティオプションをチェックします。
- 2WWWの統一ルール(あり/なし)を選択します。
- 3生成されたコードをサイトルートの .htaccess に配置します。
Apache サーバー最適化
標準の mod_rewrite 構文に準拠し、レンタルサーバーやVPSで即座に動作します。
よくある質問 (FAQ)
Apache .htaccess ジェネレーター をお気に入りいただけましたか?エンジニア仲間に、広告なし・完全ローカルの安全なツールを共有しましょう!
MiniToolDesk は 100% 無料かつクライアントサイド動作です。皆様の応援が支えです。
関連開発ツール
Popular
Docker Run → Compose 変換器
複雑な docker run コマンドを本番対応の docker-compose.yml に瞬時に変換
Launch tool→
Popular
Nginx 設定ファイル生成器
リバースプロキシ、SSL、SPA ルーティング、WebSocket 設定を直感的に可視化生成
Launch tool→
Popular
Dockerfile マルチステージ生成器
Node.js、Go、Python、Rust、Java 向けの軽量・セキュアなマルチステージ Dockerfile を生成
Launch tool→
Popular
Kubernetes YAML マニフェスト生成器
Deployment、Service、Ingress、ConfigMap を GUI で安全生成
Launch tool→