Omnikite Logo
Omnikite
Toggle theme

Apache .htaccess & Nginx Redirect Builder

100% In-Browser Privacy
Trending

Generate 301 redirects, force HTTPS, non-www, and cache headers.

Subdomain Canonical:
Source Path (Old Route)
Destination URL (301 Target)
.htaccess configuration
# ==================================================================
# Apache .htaccess Production Configuration — Omnikite Studio Pro
# ==================================================================

RewriteEngine On

# 1. Force HTTPS
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

# 2. Redirect www to non-www
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
RewriteRule ^(.*)$ https://%1/$1 [R=301,L]

# 3. Remove trailing slash from URLs
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)/$ /$1 [L,R=301]

# 4. SEO 301 Permanent Redirects
Redirect 301 /legacy-tools /tools

# 5. Enterprise Security Headers
<IfModule mod_headers.c>
  Header always set Strict-Transport-Security "max-age=63072000; includeSubDomains; preload"
  Header set X-Content-Type-Options "nosniff"
  Header set X-Frame-Options "SAMEORIGIN"
  Header set Referrer-Policy "strict-origin-when-cross-origin"
  Header set Permissions-Policy "camera=(), microphone=(), geolocation=()"
</IfModule>

# 7. Gzip / Deflate Compression
<IfModule mod_deflate.c>
  AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css application/javascript application/json image/svg+xml
</IfModule>

# 8. Immutable Static Asset Browser Caching (1 Year)
<IfModule mod_expires.c>
  ExpiresActive On
  ExpiresByType image/webp "access plus 1 year"
  ExpiresByType image/png "access plus 1 year"
  ExpiresByType image/jpeg "access plus 1 year"
  ExpiresByType text/css "access plus 1 month"
  ExpiresByType application/javascript "access plus 1 month"
</IfModule>
AdvertisementOmnikite Zero Data Storage
Adsterra Ad Placement Slot (728x90)Configure keys in config/ads.ts to display live campaigns.
Non-Intrusive Banner
100% Zero-Upload Privacy

All computation executes exclusively inside your device memory using Web APIs and WebAssembly. No data or files ever leave your browser.

Real-Time Native Execution

Zero network roundtrips. Operates offline without sending external API requests, delivering instantaneous sub-millisecond computation.

Developer-First Architecture

Engineered with RFC standards, cryptographic primitives (Web Crypto Subtle API), and production-grade formatting libraries.

Step-by-Step: How to Use Apache .htaccess & Nginx Redirect Builder

  1. Select Server: Choose between Apache (.htaccess) or Nginx server configuration.
  2. Toggle Rules: Enable HTTPS redirect, non-www domain policy, caching headers, or CORS.
  3. Copy Config: Copy the clean, validated configuration snippet to your server file.

Frequently Asked Questions

Why are 301 redirects important for SEO?

A 301 redirect signals to Google that a URL has permanently moved, preserving 95%+ of the original page's PageRank equity.