Htaccess Toolkit
/install htaccess-toolkit
htaccess Toolkit
Generate, validate, lint, and explain Apache .htaccess files with security headers, caching, CORS, compression, and more.
Generate
# HTTPS redirect + security headers + compression
python3 scripts/htaccess.py generate --rewrites http-to-https --security strict --compression
# Full production setup
python3 scripts/htaccess.py generate \
--rewrites http-to-https www-to-non-www \
--security strict \
--caching standard \
--compression \
--protect directory-listing dotfiles sensitive-files \
--error-pages 404 500 \
-o .htaccess
# WordPress hardening
python3 scripts/htaccess.py generate --protect wp-config xmlrpc dotfiles --security strict
# CORS for specific domain
python3 scripts/htaccess.py generate --cors specific --domain example.com
# Custom redirects
python3 scripts/htaccess.py generate --redirects "/old-page -> /new-page" "/blog -> https://blog.example.com"
# Hotlinking protection
python3 scripts/htaccess.py generate --protect hotlinking --domain example.com
Lint
# Basic lint
python3 scripts/htaccess.py lint .htaccess
# Strict mode (exit 1 on errors, CI-friendly)
python3 scripts/htaccess.py lint .htaccess --strict
# Filter by severity
python3 scripts/htaccess.py lint .htaccess --severity error warning
# JSON output
python3 scripts/htaccess.py lint .htaccess -f json
Lint Checks (10 rules)
rewrite-no-engine— RewriteRule without RewriteEngine Onduplicate-rewrite-engine— Multiple RewriteEngine Onredirect-no-slash— Redirect path not starting with /missing-l-flag— RewriteRule without [L] flagmixed-redirect-rewrite— Mixing Redirect and RewriteRuleunclosed-ifmodule— Unclosed IfModule blocksunclosed-files— Unclosed Files/FilesMatch blockswildcard-cors— Wildcard origin with credentialsno-hsts— HTTPS without HSTS headeroptions-minus-indexes— Directory listing not disabled
Explain
# Human-readable explanation of each directive
python3 scripts/htaccess.py explain .htaccess
List Presets
python3 scripts/htaccess.py presets
python3 scripts/htaccess.py presets -f json
Available Presets
Rewrites: http-to-https, www-to-non-www, non-www-to-www, trailing-slash-add, trailing-slash-remove, remove-extension
Security: basic, strict
Caching: standard, aggressive
CORS: permissive, specific
Protection: directory-listing, dotfiles, sensitive-files, wp-config, xmlrpc, hotlinking
Error Pages: 404, 403, 500, 503
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install htaccess-toolkit - 安装完成后,直接呼叫该 Skill 的名称或使用
/htaccess-toolkit触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
Htaccess Toolkit 是什么?
Generate, validate, lint, and explain Apache .htaccess files. Use when asked to create htaccess rules, redirect URLs, set security headers, enable caching, c... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 96 次。
如何安装 Htaccess Toolkit?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install htaccess-toolkit」即可一键安装,无需额外配置。
Htaccess Toolkit 是免费的吗?
是的,Htaccess Toolkit 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
Htaccess Toolkit 支持哪些平台?
Htaccess Toolkit 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 Htaccess Toolkit?
由 charlie-morrison(@charlie-morrison)开发并维护,当前版本 v1.0.0。