.htaccess Validator
Lint Apache .htaccess files for syntax errors, unclosed block tags, and common misconfigurations. Detects RewriteRule issues, invalid status codes, deprecated access directives, and unclosed IfModule blocks. Free and runs entirely in your browser.
How to Use .htaccess Validator
How to Use .htaccess Validator
Step 1: Paste Your .htaccess Content
Copy the full content of your .htaccess file and paste it into the input field. You can also load one of the built-in examples.
Step 2: Click Validate .htaccess
The tool checks:
- Unclosed block tags —
<IfModule>,<Files>,<FilesMatch>,<Directory>, etc. must be properly closed - RewriteEngine missing — RewriteRule and RewriteCond require
RewriteEngine Onto take effect - Invalid status codes — ErrorDocument must use a valid 4xx or 5xx HTTP code; Redirect codes must be 301, 302, 303, 307, or 308
- Deprecated directives —
Order,Allow, andDenyare deprecated in Apache 2.4+ in favour ofRequire - RewriteRule flag codes — validates [R=xxx] redirect codes in rule flags
- Unknown directives — flags unrecognised directive names that may be typos
Step 3: Review Results
Stats grid — line count, directive count, block sections, rewrite rules, redirects, and headers at a glance.
Errors — issues that will cause rules to fail or Apache to reject the file.
Warnings — non-breaking issues like deprecated directives or unusual patterns.
Block Sections — all detected <IfModule>, <Files>, and other container blocks with their arguments.
Rewrite Rules & Conditions — all RewriteRule and RewriteCond lines for review.
Tips
- Always place
RewriteEngine Onbefore anyRewriteRuleorRewriteConddirective - Every opening
<IfModule>must have a matching</IfModule>on its own line - Test
.htaccesschanges on a staging server — a syntax error can take down your entire site - Use
php_valueandphp_flagonly if PHP runs as an Apache module (not FPM or CGI) - Avoid
Order/Allow/Denyin Apache 2.4+ — useRequire all deniedorRequire all grantedinstead
Frequently Asked Questions
Most Viewed Tools
Screen Size Converter
Calculate screen width and height from diagonal size and aspect ratio. Convert between inches and centimeters for displays, TVs, and monitors with instant dimension calculations.
Use Tool →DPI Calculator
Calculate DPI (dots per inch), image dimensions, and print sizes. Convert between pixels and physical dimensions for printing and displays.
Use Tool →Paper Size Converter
Convert between international paper sizes (A4, Letter, Legal) with dimensions in mm, cm, and inches. Compare ISO A/B series and North American paper standards.
Use Tool →Fuel Consumption Converter
Convert between MPG (miles per gallon), L/100km (liters per 100 kilometers), and other fuel efficiency units. Compare car fuel economy across different measurement systems.
Use Tool →Product Schema Generator
Generate JSON-LD Product schema markup for SEO. Add product details like name, price, brand, rating, and availability to create structured data for rich search results.
Use Tool →CSV Splitter
Split large CSV files into smaller files by number of rows. Process large datasets in manageable chunks instantly.
Use Tool →Large Text File Viewer
View and search large text files up to 200MB in your browser. Features virtual scrolling, line numbers, search functionality, and file statistics. Perfect for log files, CSV, JSON, and code files.
Use Tool →Seconds to Time Converter
Convert seconds to HH:MM:SS time format instantly with precise calculations and easy-to-read formatting.
Use Tool →Related Development Tools
QR Code Generator
FeaturedCreate custom QR codes for URLs, text, and contact info
Use Tool →HTML Validator
Validate HTML markup and check for common issues. Detect missing attributes, accessibility problems, deprecated tags, and structure errors. Free and runs entirely in your browser.
Use Tool →Query String Parser
Parse URL query strings into readable key-value pairs. Decode parameters and inspect URL search queries with ease.
Use Tool →API Key Validator
Validate API key format and detect the provider instantly in your browser. Supports OpenAI, Stripe, GitHub, AWS, Google, Anthropic, HuggingFace, Slack, SendGrid, Twilio, and more. Includes entropy analysis.
Use Tool →JavaScript Syntax Checker
Check JavaScript code for syntax errors instantly in your browser. Get exact line and column numbers for each error, plus code statistics like function count, variable declarations, and imports. Free and works offline.
Use Tool →Slug Generator
Generate URL-friendly slugs from any text. Create SEO-optimized slugs for blog posts, products, and web pages instantly.
Use Tool →SSL Certificate & Key Decoder
Decode X.509 SSL/TLS certificates and RSA private keys in your browser. View subject, issuer, SANs, validity dates, key type, serial number, and SHA-256/SHA-1 fingerprints. Optionally check if a certificate and private key match.
Use Tool →MIME Type Finder
Find MIME type for file extensions instantly. Look up media types for images, videos, documents, and more.
Use Tool →Share Your Feedback
Help us improve this tool by sharing your experience