Options -Indexes# ============================================
# .htaccess — ADVAY SINGH (advaysingh.co.in)
# NOTE: Ye file domain-independent hai — HTTP_HOST khud pakadta hai
# ============================================
# --- FORCE HTTPS (safe version: proxy/CDN pe bhi loop nahi hoga) ---
RewriteEngine On
# Redirect only when BOTH direct-HTTPS and proxy-HTTPS are off
RewriteCond %{HTTPS} !=on
RewriteCond %{HTTP:X-Forwarded-Proto} !https
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
# --- Security: sensitive files ko public access se block karo ---
Require all denied
# --- Security: backup/test/tools PHP files block (agar webroot me padi hain) ---
Require all denied
# --- Optional: directory listing off (security) ---
Options -Indexes
# --- Default page ---
DirectoryIndex index.php index.html
# ============================================
# PHP VERSION HANDLER — NAYE HOSTING KE HISAB SE
# cPanel hai to "Select PHP Version" me 8.x choose karo.
# VPS hai to ye block HATA do.
# ============================================
# php -- BEGIN cPanel-generated handler, do not edit
AddHandler application/x-httpd-ea-php82___lsphp .php .php8 .phtml
# php -- END cPanel-generated handler, do not edit