# RewriteEngine on
# RewriteCond %{REQUEST_FILENAME} !-d
# RewriteCond %{REQUEST_FILENAME}.php -f
# RewriteRule ^(.*)$ $1.php 1 [NC'L]


# RewriteEngine On

# # Remove .php extension from URL
# RewriteCond %{REQUEST_FILENAME} !-d
# RewriteCond %{REQUEST_FILENAME}\.php -f
# RewriteRule ^(.*)$ $1.php [L]

# # Redirect index.php to the root domain
# RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.php
# RewriteRule ^index\.php$ / [R=301,L]
RewriteEngine On
RewriteBase /

# Remove .php extension from URL
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\.php -f
RewriteRule ^(.*)$ $1.php [L]

# Redirect to non-.php URL
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /(.+)\.php\ HTTP/
RewriteRule ^(.+)\.php$ /$1 [R=301,L]
RewriteCond %{HTTP_HOST} ^youthpdorg\.in$ [OR]
RewriteCond %{HTTP_HOST} ^www\.youthpdorg\.in$
RewriteRule ^student\-login$ "https\:\/\/exams\.youthpdorg\.in\/student_login\.php" [R=301,L]
