⚙️

.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.

ValidatorsDevelopment
Loading tool...

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 On to 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 directivesOrder, Allow, and Deny are deprecated in Apache 2.4+ in favour of Require
  • 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 On before any RewriteRule or RewriteCond directive
  • Every opening <IfModule> must have a matching </IfModule> on its own line
  • Test .htaccess changes on a staging server — a syntax error can take down your entire site
  • Use php_value and php_flag only if PHP runs as an Apache module (not FPM or CGI)
  • Avoid Order/Allow/Deny in Apache 2.4+ — use Require all denied or Require all granted instead

Frequently Asked Questions

Most Viewed Tools

📺

Screen Size Converter

868 views

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

315 views

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

283 views

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

263 views

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

245 views

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

239 views

Split large CSV files into smaller files by number of rows. Process large datasets in manageable chunks instantly.

Use Tool →
📄

Large Text File Viewer

190 views

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

180 views

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

Featured

Create 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

We will only use this to follow up on your feedback