RewriteEngine On

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

# HTTP to HTTPS
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://www.rssindia.com/$1 [R=301,L]

RewriteEngine On

# Redirect 404 errors to custom 404.php
ErrorDocument 404 /404.php

# Route all requests to index.php unless it's an existing file or directory
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php [L]
