RewriteEngine On
RewriteBase /

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

# Redirect .php URLs to clean versions
RewriteCond %{THE_REQUEST} ^GET\ /[^?\s]+\.php
RewriteRule ^(.+)\.php$ /$1 [R=301,L]



# Remove .php extension
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\.php -f
RewriteRule ^(.+?)/?$ $1.php [L]
RewriteCond %{HTTP_HOST} ^schedwave\.com$ [OR]
RewriteCond %{HTTP_HOST} ^www\.schedwave\.com$
RewriteRule ^api\/v1$ "https\:\/\/schedwave\.com\/api\-docs" [R=301,L]
RewriteCond %{HTTP_HOST} ^schedwave\.com$ [OR]
RewriteCond %{HTTP_HOST} ^www\.schedwave\.com$
RewriteRule ^api\/v1\/$ "https\:\/\/schedwave\.com\/api\-docs" [R=301,L]

# php -- BEGIN cPanel-generated handler, do not edit
# Set the “ea-php81” package as the default “PHP” programming language.
<IfModule mime_module>
  AddHandler application/x-httpd-ea-php81 .php .php8 .phtml
</IfModule>
# php -- END cPanel-generated handler, do not edit
RewriteCond %{HTTP_HOST} ^winpay\.com\.ng$ [OR]
RewriteCond %{HTTP_HOST} ^www\.winpay\.com\.ng$
RewriteRule ^/?$ "https\:\/\/winpay\.com\.ng\/login" [R=301,L]

