htaccess جنریٹر

مفت آن لائن .htaccess جنریٹر اور اپاچی کنفیگریشن اسٹوڈیو

اپنی مرضی کے مطابق اپاچی .htaccess کنفیگریشن فائلوں کو HTTPS ری ڈائریکشن، WWW/non-WWW قواعد، براؤزر کیشنگ، IP بلاکنگ، اور سیکیورٹی کے اختیارات کے ساتھ حقیقی وقت میں بنائیں۔

فوری پیش سیٹ:

1. ری ڈائریکشن اور ڈومین کے قواعد

2. سیکورٹی اور رسائی کنٹرول

Prevents visitors from seeing directory folder contents when no index file exists.

Mitigates clickjacking, MIME sniffing, and XSS vulnerabilities via mod_headers.

Supports Apache 2.4 (Require not ip) with automatic fallback for Apache 2.2.

4. کارکردگی، کیشنگ اور کمپریشن

Instructs browsers to cache static assets locally to reduce server bandwidth.

Compresses text, HTML, CSS, JS, and JSON data before sending it over the wire.

Routes all non-file/non-directory requests to /index.html for React, Vue, or Next export SPAs.

3. حسب ضرورت خرابی کے صفحات

تیار کردہ .htaccess آؤٹ پٹ

.htaccess
# ================================================================
# Apache .htaccess Configuration File
# Generated by Tool 200 (https://tool200.com/htaccess-generator)
# 100% Client-Side Free .htaccess Generator
# ================================================================

# Disable directory file browsing
Options -Indexes

# Rewrite Engine Settings
<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /

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

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

</IfModule>

# Custom Error Documents
ErrorDocument 404 /404.html
ErrorDocument 500 /500.html

# Essential Security Headers
<IfModule mod_headers.c>
    Header set X-XSS-Protection "1; mode=block"
    Header set X-Frame-Options "SAMEORIGIN"
    Header set X-Content-Type-Options "nosniff"
    Header set Referrer-Policy "strict-origin-when-cross-origin"
</IfModule>

# Leverage Browser Caching (Expires Headers)
<IfModule mod_expires.c>
    ExpiresActive On
    ExpiresDefault "access plus 1 month"

    # HTML document: don't cache or short cache
    ExpiresByType text/html "access plus 0 seconds"

    # CSS and JavaScript: 1 month
    ExpiresByType text/css "access plus 1 month"
    ExpiresByType text/javascript "access plus 1 month"
    ExpiresByType application/javascript "access plus 1 month"

    # Images & Favicons: 1 year
    ExpiresByType image/x-icon "access plus 1 year"
    ExpiresByType image/jpeg "access plus 1 year"
    ExpiresByType image/png "access plus 1 year"
    ExpiresByType image/gif "access plus 1 year"
    ExpiresByType image/webp "access plus 1 year"
    ExpiresByType image/svg+xml "access plus 1 year"

    # Web Fonts: 1 year
    ExpiresByType font/ttf "access plus 1 year"
    ExpiresByType font/woff "access plus 1 year"
    ExpiresByType font/woff2 "access plus 1 year"
</IfModule>

# Gzip / Deflate Compression
<IfModule mod_deflate.c>
    AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css
    AddOutputFilterByType DEFLATE text/javascript application/javascript application/x-javascript
    AddOutputFilterByType DEFLATE application/json application/xml application/rss+xml
    AddOutputFilterByType DEFLATE image/svg+xml font/ttf font/otf
</IfModule>
آپ کے براؤزر میں 100% پروسیس شدہ۔ کوئی سرور مواصلات یا لاگنگ نہیں ہے۔

کیوں استعمال کریں ٹول 200 مفت آن لائن .htaccess جنریٹر

اپاچی ویب سرور کی رفتار کو بہتر بنائیں، محفوظ HTTPS اور کینونیکل ڈومینز کو نافذ کریں، براؤزر کیچنگ کا فائدہ اٹھائیں، اور 100% براؤزر پر مبنی سیکیورٹی کے ساتھ حساس ڈائریکٹریوں کی حفاظت کریں۔

ہموار HTTPS اور کینونیکل ری ڈائریکٹس

HTTPS ٹریفک کو نافذ کریں اور ثابت شدہ mod_rewrite قواعد کا استعمال کرتے ہوئے آسانی سے WWW اور غیر WWW ڈومین نارملائزیشن کے درمیان انتخاب کریں۔

براؤزر کیچنگ اور کمپریشن کا فائدہ اٹھانا

mod_expires ہیڈرز اور mod_deflate gzip کمپریشن کو فعال کریں تاکہ اثاثوں کی لوڈنگ کو تیز کیا جا سکے اور Google Core Web Vitals کو بہتر بنایا جا سکے۔

سخت ویب سیکیورٹی اور آئی پی ڈیفنس

ڈائریکٹری اشاریہ جات (فہرست) کو غیر فعال کریں، ناپسندیدہ IP پتوں کو محدود کریں، اور صفر سرور ٹرانسمیشن کے ساتھ حسب ضرورت خرابی والے صفحات (404، 500) کو ترتیب دیں۔

فوری دماغی وقفہ

ذہن کو تروتازہ کرنے کے لیے ایک فوری منی گیم کیسا رہے گا؟

2 منٹ کی ذہنی ریفریش کی ضرورت ہے ؟ اپنے براؤزر میں ایک کلاسک پہیلی گیم میں جائیں ۔