Apache .htaccess Formatter & Validator
Гид
Apache .htaccess Formatter & Validator
Format and validate Apache .htaccess files with proper block indentation, syntax checking, and common error detection. Paste your .htaccess content and instantly see consistently formatted output with validation warnings for unclosed blocks, mismatched tags, invalid RewriteRule flags, and more. Includes common snippet templates and a RewriteRule flag reference.
Как использовать
Paste your .htaccess content into the input area. The formatter processes it instantly — indenting block directives (IfModule, Directory, Files, etc.), normalizing comments, and validating syntax. Configure indent style (2 spaces, 4 spaces, or tabs), comment normalization, and blank line handling. Copy the formatted output or download it as an .htaccess file. Use the common snippets section to quickly insert standard configurations.
Функции
- Block Indentation — Automatically indents nested directives inside IfModule, Directory, Files, FilesMatch, Location, LocationMatch, Limit, VirtualHost, Proxy, RequireAll, RequireAny, and other Apache block directives.
- Проверка синтаксиса — Real-time error detection: unclosed blocks, extra closing tags, mismatched block types, missing RewriteEngine directive, invalid RewriteRule flags. Color-coded with line numbers.
- RewriteRule Flag Checking — Validates flags in RewriteRule directives against the full list of known Apache flags (L, R, NC, QSA, NE, PT, P, F, G, C, CO, E, H, N, NS, S, T, B, DPI, END).
- Comment Handling — Preserves all comments with optional normalization (ensures space after #). Inline comments maintained in position.
- Formatting Options — Configurable indent style (2 spaces, 4 spaces, tab), comment normalization toggle, blank line collapsing.
- Common Snippets — Quick-insert templates: force HTTPS, trailing slash handling, custom error pages, IP blocking, GZIP compression, cache headers, directory listing prevention.
- RewriteRule Reference — Collapsible reference table with all RewriteRule flags and their descriptions, plus RewriteCond/RewriteRule syntax guide.
- Экспорт — Copy formatted output or download as .htaccess file.
Validation Checks
Block matching: Every opening block tag must have a corresponding closing tag of the same type. RewriteEngine: Warns if RewriteRule or RewriteCond directives are used without RewriteEngine On. Flag validation: Checks RewriteRule flags against known Apache mod_rewrite flags. Duplicate detection: Alerts when the same directive appears multiple times (may be intentional but worth reviewing).
What is an .htaccess file?
What are the most common RewriteRule flags?
Why does my .htaccess redirect loop?
Is my .htaccess content sent to a server?
Установите наши расширения
Добавьте инструменты ввода-вывода в свой любимый браузер для мгновенного доступа и более быстрого поиска
恵 Табло результатов прибыло!
Табло результатов — это интересный способ следить за вашими играми, все данные хранятся в вашем браузере. Скоро появятся новые функции!
Подписаться на новости
все Новые поступления
всеОбновлять: Наш последний инструмент was added on Апр 10, 2026
