.htaccess & Redirect Generator
Create production-ready Apache and Hostinger .htaccess configuration files visually. Toggle Force HTTPS (SSL), www to non-www canonical redirects, React/Vite Single Page App routing, GZIP compression, and bulk 301 redirects.
How to Use .htaccess & Redirect Generator
- Enter Your Primary Domain: Type your domain name (e.g. tookzy.com) and toggle Force HTTPS, non-www, GZIP, and SPA routing.
- Add Custom 301 Redirects: Optionally list old paths and new destination URLs (one per line).
- Copy or Download .htaccess: Copy the generated Apache rules or download the `.htaccess` file directly for Hostinger/cPanel.
Key Features of .htaccess & Redirect Generator
- Hostinger & cPanel Ready: Generates clean Apache mod_rewrite and mod_deflate directives tested on Hostinger.
- Force HTTPS & Canonical WWW: Eliminate duplicate content by redirecting HTTP to HTTPS and www to non-www.
- React / Vite SPA Routing: Includes the exact `RewriteRule ^ index.html [QSA,L]` rule needed for React Single Page Apps.
- Bulk 301 Redirect Builder: Convert old URLs into permanent SEO-safe 301 redirects effortlessly.
Generate Apache & Hostinger .htaccess Rules for SSL, SPA Routing & 301 Redirects
A single typo in an `.htaccess` file can take down your website or break client-side React routing.
Our `.htaccess` & Redirect Generator builds clean, production-tested Apache configuration rules for SSL enforcement, canonical domains, React SPA routing, GZIP compression, and 301 redirects.
- One-click Force HTTPS (SSL) and www-to-non-www 301 canonical redirects
- Built-in React / Vue / Vite SPA fallback routing rule
- GZIP text/script compression and directory browsing protection (Options -Indexes)
- Direct `.htaccess` file download or clipboard copy
Frequently Asked Questions
Where should I upload the .htaccess file on Hostinger?
Upload the `.htaccess` file directly into your domain's `public_html` root folder using Hostinger File Manager.
Why do React apps show 404 on page refresh without .htaccess?
Without the SPA fallback rule, Apache looks for a physical folder matching the route URL. The SPA rule routes all virtual paths to `index.html`.
More Free Dev & Code on Tookzy
- Base64 Encoder & Decoder — Encode plain text to Base64, decode Base64 strings back to readable text, or convert images into Base64 data URIs.
- JSON Formatter & Validator — Beautify, minify, and validate raw JSON data with instant syntax error detection and line/column reporting.
- Schema Markup (JSON-LD) Generator — Generate Google Rich Result JSON-LD structured data for E-Commerce Products, FAQPages, Articles, and Local Businesses.
- JWT (JSON Web Token) Decoder — Decode and inspect JWT headers, payload claims, and expiration timestamps 100% locally in your browser.
- SHA-256 / SHA-512 & HMAC Hash Generator — Generate cryptographic SHA-256, SHA-512, and SHA-1 digests or keyed HMAC signatures locally using the Web Crypto API.
- CSS Glassmorphism & Box-Shadow Studio — Visually design frosted-glass backdrop-filter cards and smooth elevation box-shadows with instant cross-browser CSS code.
- CSV ↔ JSON Bi-Directional Converter — Convert CSV spreadsheets to structured JSON arrays or flatten JSON arrays into Excel-ready CSV files instantly.
- URL Query String Parser & Encoder / Decoder — Break down complex URLs into an interactive parameters table, edit or add query keys dynamically, and encode/decode raw URI strings.
- WCAG Color Contrast Checker — Test text and background color contrast ratios against official WCAG 2.1 AA and AAA accessibility standards.
- CSS Clip-Path & Polygon Maker — Visually design custom CSS clip-path polygon shapes with interactive drag-and-drop control points.
- Responsive CSS Clamp() & Fluid Typography Calculator — Generate modern fluid typography and responsive sizing formulas with live viewport resize simulation.
- CSS Flexbox & CSS Grid Visual Playground — Interactive visual layout builder for CSS Flexbox and CSS Grid with live container simulation and instant code export.