Options +FollowSymLinks DirectoryIndex index.php index.html RewriteEngine On AddDefaultCharset UTF-8 # 1️⃣ www → non-www RewriteCond %{HTTP_HOST} ^www\.pehlupaglu\.in$ [NC] RewriteRule ^(.*)$ https://pehlupaglu.in/$1 [R=301,L] # 2️⃣ REMOVE DOUBLE SLASHES RewriteCond %{THE_REQUEST} // RewriteRule ^(.*)$ /$1 [R=301,L] # 3️⃣ GSEB BASE RewriteRule ^gseb/?$ gujarati_medium.php [L,QSA] RewriteRule ^gseb/([^/]+)/?$ gujarati_medium.php?standard=$1 [L,QSA,NE] # 4️⃣ GSEB SUBJECT PAGE RewriteRule ^gseb/([^/]+)/([^/]+)/?$ subject.php?standard=$1&subject=$2 [L,QSA,NE] # 5️⃣ GSEB VIDEO PAGE RewriteRule ^gseb/([^/]+)/([^/]+)/(.+)/?$ educationvideo.php?id=$1&subject=$2&title=$3 [L,QSA,NE] # 6️⃣ VIDEO PAGE RewriteRule ^gsebvideo/([^/]+)/([^/]+)/?$ video.php?id=$1&slug=$2 [L,QSA,NE] RewriteRule ^video/([0-9]+)(/[^/]*)?/?$ video_app.php?id=$1 [L,QSA,NE] # 3️⃣ SHORTVIDEO FIX - prevent rewrite conflict RewriteRule ^shortvideo/?$ fetch_short_videos.php [L,QSA] RewriteRule ^shortvideo/([^/]+)/?$ fetch_short_videos.php?standard=$1 [L,QSA,NE] # 7️⃣ SAFE AUTO .php RewriteCond %{REQUEST_URI} !^/shortvideo/ RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME}\.php -f RewriteRule ^(.+)$ $1.php [L] Options -Indexes google.com, pub-9277188753092369, DIRECT, f08c47fec0942fa0